Hi Bryan
See
http://www.rondebruin.nl/menuid.htm
For the workbook run the code in this two events in the ThisWorkbook module
Read more about events on Chip Pearson's site.
http://www.cpearson.com/excel/events.htm
Private Sub Workbook_Activate()
'your code to change Enabled to False
'Or the name of your macro
End Sub
Private Sub Workbook_Deactivate()
'your code to change Enabled to True
'Or the name of your macro
End Sub
--
Regards Ron de Bruin
http://www.rondebruin.nl
"Type of Sheet displayed" wrote in message
...
I have created a custom menu item for the application being created in Excel
via VB code. However, I'm wanting to disable one of the submenu items until
a certain worksheet is selected or perhaps just make it invisible until this
said worksheet is selected. I'm rather new to VB coding but not to coding by
any stretch. Can anyone provide a short example of how do this from another
code module than the one which created the menu and submenu items? I'm sure
I'm not doing the explicit notation correctly and I should be able to just
call the right submenu item by name, id, or perhaps tag without looping
through them all, right?
Thanks,
Bryan