ask beforeContextMenu Code

L

lizj

i Copied code from msdn:

in VBScript

How i can fire the event, or i need right click one menu and then popup
another page, anyone can tell me how to do??

Sub Spreadsheet1_BeforeContextMenu(x, y, Menu, Cancel)

Dim cmContextMenu(4)
Dim cmClearSubMenu(2)

cmClearSubMenu(0) = Array("&All", "ClearAll")
cmClearSubMenu(1) = Array("&Formats", "ClearFormats")
cmClearSubMenu(2) = Array("&Values", "ClearValues")

cmContextMenu(0) = Array("Cu&t", "owc2")
cmContextMenu(1) = Array("&Copy", "owc3")
cmContextMenu(2) = Array("&Paste", "owc4")
cmContextMenu(3) = Empty
cmContextMenu(4) = Array("Clea&r", cmClearSubMenu)

Menu.Value = cmContextMenu

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top