Auto Right Click

  • Thread starter Thread starter Steven
  • Start date Start date
S

Steven

Can you make the Right Click so it automatically runs a macro on the Right
Click instead of having to click the Right Click and then the item. I just
want one item on the right click and I want it to run automatically.

Thank you,

Steven
 
Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As
Boolean)
MsgBox "Right-Clicked"
Cancel = True 'cancel default action
End Sub

Tim
 
Tim,

Thanks for the repsonse. I need to add one thing. I want to make it
permanent for all workbooks .. basically for the entire excel application.
The code below would only work on that specific workbook.

Steven
 

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