Event proceedures

  • Thread starter Thread starter ksnapp
  • Start date Start date
K

ksnapp

I can't get event procedures to work for me

i pasted this one on the code window for sheet one and it didn't work
Private Sub Worksheet_BeforeRightClick(ByVal Target As Excel.Range, _
Cancel As Boolean)
Cancel = True
MsgBox "Shortcut menus are disabled in this worksheet!"
End Sub

hel
 
Did you Save and Close the workbook after the code was pasted. These events are not activated until after you do

----- ksnapp > wrote: ----

I can't get event procedures to work for m

i pasted this one on the code window for sheet one and it didn't wor
Private Sub Worksheet_BeforeRightClick(ByVal Target As Excel.Range,
Cancel As Boolean
Cancel = Tru
MsgBox "Shortcut menus are disabled in this worksheet!
End Su

hel
 
Not true, type it in and it works immediately.

OP< are you sure you put the code in the worksheet code module, not a
standard code module? To do so, right-click the sheet tab, select View Code
from the menu, and paste the code in.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

chris said:
Did you Save and Close the workbook after the code was pasted. These
events are not activated until after you do!
 

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

Back
Top