My Assistant
![]() ![]() |
|
|
Oct 7 2005, 05:25 AM
Post
#1
|
|
|
UtterAccess Veteran Posts: 473 |
I seem to have lost the Formatting Menu bar from Excel, to the point where it is not even on the list of toolbars I can reselect.
I have identified that it is down to a specific Excel file that I have created, where I am trying to control which menus are available. Is it possible to programmatically retrieve the Formatting menu, since everyone that opens it is now losing their Formatting toolbar? As a point of reference the only the code I can think of that may be affecting things is in the on open of 'This Workbook' module. Application.CommandBars(4).Enabled = False Application.CommandBars("Edit").Enabled = False Application.CommandBars("Data").Enabled = False Application.CommandBars("View").Enabled = False Application.CommandBars("Window").Enabled = False Application.CommandBars("Format").Controls("Row").Enabled = False Application.CommandBars("Format").Controls("Column").Enabled = False Application.CommandBars("Format").Controls("Sheet").Enabled = False Application.CommandBars("Format").Controls("AutoFormat...").Enabled = False Application.CommandBars("Format").Controls("Conditional Formatting...").Enabled = False Application.CommandBars("Format").Controls("Style...").Enabled = False Application.CommandBars("Shortcut").Enabled = False I obviously have the reverse Enabled = true in the close procedure. |
|
|
|
Oct 13 2005, 09:56 PM
Post
#2
|
|
|
UtterAccess Addict Posts: 184 From: Berks County, PA |
Your Correct in your starting Point
Application.CommandBars(4).Enabled = False Command Bar 4 is the Formatting Toolbar This little code snippet will give you the name, number and visibility of all the Bars CODE Sub NameNNumberCmdBars() ' Ask each commandbar for it's name and number and status... Dim cmdbr As CommandBar For Each cmdbr In Application.CommandBars Debug.Print cmdbr.Index, cmdbr.Name, cmdbr.Visible Next cmdbr End Sub |
|
|
|
Nov 1 2005, 11:04 AM
Post
#3
|
|
|
UtterAccess Veteran Posts: 473 |
That's excellent, thanks.....
But......can I now do the same for individual controls??? Such as Insert on the Worksheet Menu Bar???? |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 25th May 2013 - 01:50 PM |