|
-
Sep 8th, 2003, 12:57 AM
#1
Thread Starter
New Member
Excel - Hide Macros Toolbar
I have written a file where I do not want other users to access the 'tools - macros' toolbar. Is there some simple code to either hide the 'Worksheet Menu Bar' or at least diable the 'Tools - Macro' function on the 'Worksheet Menu Bar'?
Help!
-
Sep 12th, 2003, 08:09 PM
#2
Fanatic Member
I don't think you can easily hide the menu bar. In my experience people almost always end up with more problems than they bargained for when messing with standard Office toolbars, but here's how you kill the Macro menu item:
VB Code:
Application.CommandBars("Tools").Controls("Macro").Delete
-
Sep 12th, 2003, 09:29 PM
#3
Thread Starter
New Member
Many thanks, more research has revealed the following code
Dim cbar As CommandBar
For Each cbar In CommandBars
If cbar.Enabled And cbar.Type = msoBarTypeNormal Then
cbar.Visible = False
End If
Next cbar
CommandBars("Worksheet Menu Bar").Enabled = False
It works well, however, the closing code must return the spread sheet back to normal or all sorts of grief occurs.
Many thanks again
GB
-
Sep 12th, 2003, 09:52 PM
#4
Fanatic Member
Ahh, yes. I didn't think of disabling the toolbars.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|