Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable Menu Items
I am currently using vba to disable menu items, using the
Application.CommandBars syntax, for example: Application.CommandBars("Edit").Controls(2).Enable d = False This is having an effect on all of Excel. Is there a way I can disable it only for the Active Workbook. I tried this: ActiveWorkbook.CommandBars("Edit").Controls(2).Ena bled = False but I am getting an error "obejct variable not set" run time 91 Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable Menu Items
hi James
See http://www.rondebruin.nl/menuid.htm Is there a way I can disable it only for the Active Workbook. Read also this section Other useful examples -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "James" wrote in message ... I am currently using vba to disable menu items, using the Application.CommandBars syntax, for example: Application.CommandBars("Edit").Controls(2).Enable d = False This is having an effect on all of Excel. Is there a way I can disable it only for the Active Workbook. I tried this: ActiveWorkbook.CommandBars("Edit").Controls(2).Ena bled = False but I am getting an error "obejct variable not set" run time 91 Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable Menu Items
Put the disable command [Application.CommandBars("Edit").Controls(2).Enable d
= False] in the "Private Sub Workbook_Activate()" procedure of the 'ThisWorkbook' and the enable command [Application.CommandBars("Edit").Controls(2).Enable d = True] in the "Private Sub Workbook_Deactivate()" of the 'ThisWorkbook'. -- Hope this helps. If it does, please click the Yes button. Thanks in advance for your feedback. Gary Brown "James" wrote: I am currently using vba to disable menu items, using the Application.CommandBars syntax, for example: Application.CommandBars("Edit").Controls(2).Enable d = False This is having an effect on all of Excel. Is there a way I can disable it only for the Active Workbook. I tried this: ActiveWorkbook.CommandBars("Edit").Controls(2).Ena bled = False but I am getting an error "obejct variable not set" run time 91 Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
disable menu items | Excel Programming | |||
Enable/Disable Menu Items | Excel Programming | |||
Is is possible to disable certain menu items | Excel Programming | |||
Disable menu items with VBA | Excel Programming | |||
HELP - How do I disable Excels menu items so others can't use | Excel Programming |