business_analyst
Board Regular
- Joined
- Jun 5, 2009
- Messages
- 99
Hello All,
So I have some code located in ThisWorkbook:
I call this on workbookopen so that it appears to the user like a full blown program/application and not an excel workbook. This works fine, however once the user clicks on any Button, or enters any Userform, this ugly distorted grey bar appears on the top of the screen. It looks as if the graphics weren't updated right. I can't figure out how to make this go away. I tried searching the web, and this issue has happened to other ppl, but there doesn't seem to be any solutions out there. Any help would be greatly appreciated. Thanks.
So I have some code located in ThisWorkbook:
Code:
Sub ApplicationDisplay()
Dim cbar As CommandBar
With ActiveWindow
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False
.DisplayWorkbookTabs = False
.DisplayHeadings = False
End With
With Application
.DisplayFormulaBar = False
.DisplayStatusBar = False
End With
For Each cbar In Application.CommandBars
cbar.Enabled = False
Next cbar
'To disable specific commandbars:
' CommandBars("Worksheet Menu Bar").Enabled = False
' Turns scrollbars off for all workbooks:
' Application.DisplayScrollBars = False
End Sub