Is there a way to create an event so that a certain .xlam of mine gets control whenever the user right-clicks ? In this case the user may have several .xlsx (non-macro) workbooks open which must remain free of any macro code. If the user right-clicks while one of these macro-free worksheets is open, I’d like the .xlam to gain control and possibly do something.
Share
Use a with events variable in a class such as
Then use the event SheetBeforeRightClick.
The xlsx files should have the .xlam file installed in order for it to work. Hope this helps.
http://www.cpearson.com/Excel/Events.aspx
http://www.cpearson.com/Excel/AppEvent.aspx