Thread: Startup
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein \(MVP - VB\)[_1404_] Rick Rothstein \(MVP - VB\)[_1404_] is offline
external usenet poster
 
Posts: 1
Default Startup

You can hide the toolbars using the code below. Insert a Module into your
project (Insert/Module from the VB editor's menu bar) and copy/paste the
code below into its code window....

'******* Start of Code *******
Public C As New Collection

Public Sub HideToolBars()
Dim T As Object
Set C = Nothing
For Each T In Toolbars
If T.Visible Then C.Add T
T.Visible = False
Next
End Sub

Public Sub ShowToolBars()
Dim T As Object
For Each T In C
T.Visible = True
Next
End Sub
'******* End of Code *******

You can call the HideToolBars subroutine in the Workbook Open event to hide
the toolbars. When you want to display them again, run the ShowToolBars
subroutine. While I haven't tested it, I would expect that if you hide the
toolbars, save the Excel workbook and then CLOSE it, that the ShowToolBars
subroutine would not restore them again (without doing so through Excel's
View/Toolbars menu item).

Rick


"Tanya" wrote in message
...
2003

"Nigel" wrote:

Which version of Excel are you using?

--

Regards,
Nigel




"Tanya" wrote in message
...
Hi
Is it possible to have only the menubar visible on startup with an
Excel
workbook? if so what would the script look like?
cheers
Tanya