Glaswegian
Well-known Member
- Joined
- Oct 14, 2003
- Messages
- 1,487
I have a workbook where I hide the normal toolbars and only show my custome toolbar. The workbook opens fine and only the custome toolbar shows. However, when I close the workbook I receive and error message
"Method 'visible' of object 'commandbar' failed." The code is fairly simple (or so I thought):
ActiveWindow.DisplayWorkbookTabs = False
ActiveWindow.DisplayGridlines = False
ActiveWindow.DisplayHeadings = False
Application.DisplayStatusBar = False
Application.CommandBars("Worksheet Menu Bar").Enabled = False
Application.CommandBars("Standard").Visible = False
Application.CommandBars("Formatting").Visible = False
If the 'visible' method works OK for the Formatting toolbar, I can't understand why it won't work for the Standard toolbar. Can anyone help?
Glaswegian
Excel 97 on NT4
"Method 'visible' of object 'commandbar' failed." The code is fairly simple (or so I thought):
Code:
With Application
.Caption = Empty
.CommandBars("Worksheet Menu Bar").Enabled = True
.CommandBars("Standard").Visible = True
.CommandBars("Formatting").Visible = True
.ScreenUpdating = True
.DisplayStatusBar = True
.DisplayFormulaBar = True
.CommandBars("BCS Toolbar").Enabled = False
End With
The opening code is
ActiveWindow.DisplayGridlines = False
ActiveWindow.DisplayHeadings = False
Application.DisplayStatusBar = False
Application.CommandBars("Worksheet Menu Bar").Enabled = False
Application.CommandBars("Standard").Visible = False
Application.CommandBars("Formatting").Visible = False
If the 'visible' method works OK for the Formatting toolbar, I can't understand why it won't work for the Standard toolbar. Can anyone help?
Glaswegian
Excel 97 on NT4