There are a couple of ways to have a procedure run each time excel opens the workbook. The first way is to put the procedure in a General module (not behind a
worksheet, not behind ThisWorkbook).
Code:
Name that procedure
Sub Auto_Open()
(and don't change the name)
Sub Auto_Open()
Application.WindowState = xlMaximized 'maximize the application window
ActiveWindow.WindowState = xlMaximized 'maximize the workbook window
End Sub
The second way is to use the Workbook_Open event. This procedure goes behind the ThisWorkbook module : Private Sub Workbook_Open(). You can't change the name of this one, either (or excel won't find either of them) :
Code:
Private Sub Workbook_Open()
Application.WindowState = xlMaximized 'maximize the application window
ActiveWindow.WindowState = xlMaximized 'maximize the workbook window
End Sub
Bookmarks