Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / March 2006

Tip: Looking for answers? Try searching our database.

Using BeforeRightClick in addins

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
hubbabubba - 21 Mar 2006 19:43 GMT
Please help! I am using BeforeRightClick to run some code in Excel 2003 VBA
(XP Professional), and setting Cancel=True to disable the default drop down
menu. This works fine when I am working in the .xls worksheet in which the
code resides, but when I try to implement the sheet as an .xla addin, the
code never executes and the default cut.copy, paste etc. menu is all I get.
It doesn't appear to matter if I place the code in the Workbook or Worksheet
regions, or make it public or private, or anything else I have tried. Getting
frustrated!

Any suggestions or work-arounds would be most welcome.
Tom Ogilvy - 21 Mar 2006 19:41 GMT
built in events only apply to the workbook in which they are written.  So
your event would only fire if you right clicked in the addin - which you
obviously can not do nor have any interest  in trapping.  You need to have
your addin instantiate and handle Application Level events.

See Chip Pearson's site for a gentle introduction similar to what is
available in help.

http://www.cpearson.com/excel/appevents.htm

Signature

Regards,
Tom Ogilvy

> Please help! I am using BeforeRightClick to run some code in Excel 2003 VBA
> (XP Professional), and setting Cancel=True to disable the default drop down
[quoted text clipped - 6 lines]
>
> Any suggestions or work-arounds would be most welcome.
hubbabubba - 27 Mar 2006 02:16 GMT
Tom,

You da man! I went to the recommended link and was up and running in 15
minutes. Consider my hat respectfully tipped...

HubbaBubba

> built in events only apply to the workbook in which they are written.  So
> your event would only fire if you right clicked in the addin - which you
[quoted text clipped - 16 lines]
> >
> > Any suggestions or work-arounds would be most welcome.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.