Tech Support Guy banner
Status
Not open for further replies.

Excel (VBA) to detect mouse clicks

1 reading
7.8K views 4 replies 2 participants last post by  CodeLexicon  
#1 ·
I'm using Excel 2010
I know how to work with the worksheet events but my question is a non-worksheet event.
I found some information but cannot put it to work (read: I do NOT know how to use it :) )

I have added a class module which has the following code, nothing more, nothing less.
Code:
Option Explicit

Private WithEvents App As Application
Attribute App.VB_VarHelpID = -1

Private Sub Class_Initialize()
    Set App = Application
End Sub
I use a customized Addin which I load when needed and apply the macros within it do carry out different taks on any opened Excel file that is non-macro embedded.

What I am looking for is some code that instead of using the worksheet events detects if I click the right-mouse button and have it execute a macro I think is interesting or display a pop-up menu, etc.

All these functions I already have in macro embedded files but now want then to be available wtihout needing a macro embedded file.

Any ideas hints tips whatever are welcome, give me a tip of the iceberg and I'll try to locate the rest of it and build around it. :D

Thanks in advance for anything you might think can put me on the right track.
 
Save
#2 ·
Save
#3 ·
Thanks for the 'iceberg' I'll take the dive and let you know.
I have been using context menu's but had the linked with worksheet events.
I take alook and Ron de Bruin's tips which are very explicit. Thanks to his explanations and tips I've been getting more from the Ribbon Menu.'
 
Save
Status
Not open for further replies.
You have insufficient privileges to reply here.