Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
HELP - How do I disable Excels menu items so others can't use
I was able to figure out how to disable shortcut keys, but I need to
disable the following menu items so that users can't use them while my Excel application is open. - MACROS list box - Visual Basic Editor I also need to be able to reinstate the above menu items so that they can used after I close the Excel application. I hope you can help me with this and provide the code and where exactly I should place it in the VBE. Thank you in advance. Please reply via email: SIncerely, Marcello |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
HELP - How do I disable Excels menu items so others can't use
Try this
For the Visual Basic Editor use the number 1695 This will work in 97-2003 Sub menuItem_Enabledfalse() Dim a As Integer On Error Resume Next For a = 1 To Application.CommandBars.Count For Each ctl In CommandBars(a).Controls Application.CommandBars(a).FindControl(Id:=186, Recursive:=True).Enabled = False Next ctl Next a End Sub Sub menuItem_Enabledtrue() Dim a As Integer On Error Resume Next For a = 1 To Application.CommandBars.Count For Each ctl In CommandBars(a).Controls Application.CommandBars(a).FindControl(Id:=186, Recursive:=True).Enabled = True Next ctl Next a End Sub -- Regards Ron de Bruin (Win XP Pro SP-1 XL2000-2003) www.rondebruin.nl "Marcello do Guzman" wrote in message ... I was able to figure out how to disable shortcut keys, but I need to disable the following menu items so that users can't use them while my Excel application is open. - MACROS list box - Visual Basic Editor I also need to be able to reinstate the above menu items so that they can used after I close the Excel application. I hope you can help me with this and provide the code and where exactly I should place it in the VBE. Thank you in advance. Please reply via email: SIncerely, Marcello |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
HELP - How do I disable Excels menu items so others can't use
try using the code in workbook activate deactivate events so for othe
workbooks the menu bar will be available. ignore this code if you can not switch the windows when the menuar i hidden ( ctrl+tab )(i dont know if u can swich windows when menubar i hidden -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How Can I Edit Excels Help Menu? | Excel Discussion (Misc queries) | |||
How disable menu command | Excel Discussion (Misc queries) | |||
Disable Items in Menubar | Excel Discussion (Misc queries) | |||
Menu items added with menu item editor in older versions | Excel Discussion (Misc queries) | |||
Disable menu selection | Excel Discussion (Misc queries) |