The project I'm working on has a bit of code in the workbook open event that makes excel go full screen, hide any toolbars that a user has configured to run in fullscreen (and make a note so they can be restored on exit) and loads a custom toolbar.
[code]
Application.DisplayFullScreen = True
Dim MyBar As CommandBar
Dim MyPopup As CommandBarPopup
Dim MyButton As CommandBarButton
On Error Resume Next
CommandBars("MAPS").Delete
On Error GoTo 0
Set MyBar = CommandBars.Add(Name:="MAPS", Position:=msoBarTop, temporary:=True)
With MyBar
Set MyButton = .Controls.Add(Type:=msoControlButton)
With MyButton
.Caption = "Exit"
.Style = msoButtonCaption
.OnAction = "Exit"
End With
.Visible = True
End With
[code]
This works perfectly in excel 2003. However, in excel 2007 going full screen still leaves the windows control buttons at the top right of the window and no custom toolbar appears.
Two questions:
a) how do I make the code create a custom toolbar in excel 2007 and still be compatible with 2003?
b) Is there a way to remove the windows controls from a fullscreened excel 2007 like 2003 is?
Bookmarks