auto opening

4

4ndy

can someone help me with my code?

Sub auto_open()
'
' auto_open Macro
' Macro recorded 03/10/2004 by J
'

'
With ActiveWindow
Application.Caption = "Siha Insurance Services Ltd"
.DisplayGridlines = False
.DisplayHeadings = False
.DisplayVerticalScrollBar = False
.DisplayWorkbookTabs = False
End With
Application.CommandBars("Standard").Visible = False
Application.CommandBars("Formatting").Visible = False
End Sub

i want excel to also open userform1 at startup and i am not sure ho
could someone please help with this code
 
T

Trevor Shuttleworth

Something like:

With Application
..Caption = "Siha Insurance Services Ltd"
..CommandBars("Standard").Visible = False
..CommandBars("Formatting").Visible = False
End With
With ActiveWindow
..DisplayGridlines = False
..DisplayHeadings = False
..DisplayVerticalScrollBar = False
..DisplayWorkbookTabs = False
End With
Load UserForm1
UserForm1.Show

Regards

Trevor
 
Top