1. In the Visual Basic Editor window, double-click Form_Sales Analysis Subform 1.
Private Sub Form_CommandExecute(ByVal Command As Variant) If Command = OWC11.plCommandCopy Then
MsgBox "You just copied some data to the clipboard."
3. To test the above event procedure, open Sales Analysis Subform 1 in Form view. Because you've already created several event procedures for this form, various events will be triggered. Respond appropriately to the prompts. Once the form is opened, right-click any amount in the detail rows in the PivotTable and choose Copy from the shortcut menu. After choosing the Copy command you should see the message informing you that the text was copied to the clipboard.
Was this article helpful?