View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Trapping an attempt to use a custom menu

I've managed to create a custom menu on the menu toolbar that opens and
closes with a particular workbook. It works just fine. But, I am able to
operate the menu from any open workbook and when a menu item is selected I
get an error...which I should since the menu is intended to only work with
the workbook that created it. How do I prevent the user from trying to open
the menu from outside the intended workbook. I am guessing that need to
get the identification of the workbook and compare it to the identification
of active workbook, e.g. the Activeworkbook.Name property. I'm a little over
my head on this one. Can anyone advise me?

TIA

Steve H