#1   Report Post  
ditchy
 
Posts: n/a
Default 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   Report Post  
Bob Phillips
 
Posts: n/a
Default

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   Report Post  
ditchy
 
Posts: n/a
Default

thank you BoB
I wll put this to good use, your help was much appreciated
regards, Ditchy

  #4   Report Post  
ditchy
 
Posts: n/a
Default

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   Report Post  
Bob Phillips
 
Posts: n/a
Default

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Search/Match between 2 x separate Worksheets and populate result in third worksheet Alan Bartley Excel Discussion (Misc queries) 1 April 11th 05 05:21 AM
How do i put back my excel worksheet menu bar crypaz Excel Worksheet Functions 1 April 10th 05 10:40 AM
drop down menu containing worksheet names J-Rad Excel Worksheet Functions 3 February 1st 05 03:25 AM
Weekly Transaction Processing Ralph Howarth Excel Worksheet Functions 4 January 19th 05 05:37 AM
link drop down menu to info in worksheet bob New Users to Excel 2 December 14th 04 10:09 PM


All times are GMT +1. The time now is 08:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"