Home |
Search |
Today's Posts |
#1
|
|||
|
|||
worksheet menu bar
Hello there,
would there be a way to hide the Worksheet Menu Bar for one particular workbook only, and have a macro button to unhide the Worksheet Menu Bar after a password is entered, (and not affect all the other workbooks Worksheet Menu Bars) thank you for any help or suggestions Ditchy |
#2
|
|||
|
|||
You could add it to the workbook_Activate event and unhide it in deactivate
Private Sub Workbook_Activate() if not fAlwaysShown Then Application.CommandBars("Worksheet Menu Bar").Enabled = False End If End Sub Private Sub Workbook_Deactivate() Application.CommandBars("Worksheet Menu Bar").Enabled = True End Sub and have the same code to unhide in the button macro, but create a global variable fAlwaysShown and set that to true when the password is entered.. -- HTH RP (remove nothere from the email address if mailing direct) "ditchy" wrote in message ups.com... Hello there, would there be a way to hide the Worksheet Menu Bar for one particular workbook only, and have a macro button to unhide the Worksheet Menu Bar after a password is entered, (and not affect all the other workbooks Worksheet Menu Bars) thank you for any help or suggestions Ditchy |
#3
|
|||
|
|||
thank you BoB
I wll put this to good use, your help was much appreciated regards, Ditchy |
#4
|
|||
|
|||
Hi BoB
cold you explain to me how I go about adding the workbook_activate event, and create a global variable fAlwaysShown and set that to true when the password is entered.. I am not right up with macros yet, only what I have picked up from this group. Thanks for your help Regards, Ditchy |
#5
|
|||
|
|||
Hi Ditchy,
Workbook event code goes in the THisWorkbook code module. To input this code, right click on the Excel icon on the worksheet '(or next to the File menu if you maximise your workbooks), select View Code from the menu, and paste the code The gloabl variable should be created in a normal code module, circa Public fAlwaysShown As Boolean and then, in you button macro, something like 'your code to get a password If password_correct Then ' sub with your logiv fAlwaysShown = True Application.CommandBars("Worksheet Menu Bar").Enabled = True End IF -- HTH RP (remove nothere from the email address if mailing direct) "ditchy" wrote in message oups.com... Hi BoB cold you explain to me how I go about adding the workbook_activate event, and create a global variable fAlwaysShown and set that to true when the password is entered.. I am not right up with macros yet, only what I have picked up from this group. Thanks for your help Regards, Ditchy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Search/Match between 2 x separate Worksheets and populate result in third worksheet | Excel Discussion (Misc queries) | |||
How do i put back my excel worksheet menu bar | Excel Worksheet Functions | |||
drop down menu containing worksheet names | Excel Worksheet Functions | |||
Weekly Transaction Processing | Excel Worksheet Functions | |||
link drop down menu to info in worksheet | New Users to Excel |