LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default Inhibiting cross spreadsheet custom-menu functionality.

Inhibiting cross spreadsheet custom-menu functionality.

Workbook "A" installs custom menu items when it is opened, and removes
them when closing. If another workbook "B" is opened while "A" is also
open, the custom menu items appear in workbook "B." Inadvertently
selecting a custom menu item intended for workbook "A" from workbook "B"
leads to a "run time error" which would confuse an uneducated user.

How might I best prevent the macros designed for Workbook "A," Worksheet
"A-A" from running other than when Worksheet "A-A" is active? I expect
that I could place a test at the beginning of every macro that would
stop the process if ActiveSheet.value < "Worksheet A" where "Worksheet
A" is the name of the worksheet for which the macros are designed.
However, I have nearly 200 macros, and I'm not anxious to have to
manually insert the code at the top of each of those 200 macros.

I possibly could do a global substitution , substituting ( ) + macro
code + ( ) for the ( ) that appears at the head of each macro. Can
anyone suggest a more elegant approach.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Right Click Menus - Inconsistent Functionality Lee Excel Discussion (Misc queries) 1 February 3rd 07 03:41 AM
Adding Sub Menu Item to Current Custom Menu Renato Excel Programming 2 December 19th 05 12:48 AM
custom menu cross contamination between open workbooks. windsurferLA Excel Programming 2 May 12th 05 06:03 PM
Inhibiting Moving Cells without loosing Autofill duncan Excel Programming 0 March 17th 05 06:03 PM
Custom Menu return to Excel Menu upon Closing VetcalcReport Excel Programming 2 August 2nd 04 02:59 PM


All times are GMT +1. The time now is 07:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"