jagdish_patel
New Member
- Joined
- Jan 11, 2020
- Messages
- 14
- Office Version
- 2007
- Platform
- Windows
Hi,
I am very new to get help from mrexcel.com
I want to disable Unhide option of Menubar. i got the following code for that but it is not working for me
Dim WBname As Window
Set WBname = Windows("Accounting.xlsm") 'You can use Windows("[Workbook Name]") as well
Application.CommandBars("Insert").Controls(4).Enabled = False
Application.CommandBars("Worksheet Menu Bar").Controls("Format").Controls("Sheet").Controls("Unhide...").Enabled = False
even after above code unhide option is not disabled. anybody can see that window.
where i am wrong. or what is correct code.
I would be very much grateful, please anybody can help me.
I am very new to get help from mrexcel.com
I want to disable Unhide option of Menubar. i got the following code for that but it is not working for me
Dim WBname As Window
Set WBname = Windows("Accounting.xlsm") 'You can use Windows("[Workbook Name]") as well
Application.CommandBars("Insert").Controls(4).Enabled = False
Application.CommandBars("Worksheet Menu Bar").Controls("Format").Controls("Sheet").Controls("Unhide...").Enabled = False
even after above code unhide option is not disabled. anybody can see that window.
where i am wrong. or what is correct code.
I would be very much grateful, please anybody can help me.