I want an Event-handling macros that maximizes the excel workbook and window on opening. I want this as a personal macro that would work on any of my workbooks. I currently have this:
Private Sub Workbook_Open()
Application.WindowState = xlMaximized
ActiveWindow.WindowState = xlMaximized
End Sub
It is saved the "VBAProject (PERSONAL.XLSB)" within "ThisWorkBook"
The code maximizes the workbook, but it gives me the Run-time error '91' when it reaches "ActiveWindow.WindowState = xlMaximized". Can anyone help me with this?
thank you