Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    May 2001
    Location
    Wichita, Kansas, USA
    Posts
    177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Force maximized (Office 2007)

    Since Excel 2007 usually defaults in the user's window to whatever window state they last had (minimized, maximized, half screen) -- is there a way to write VBA code into an Excel spreadsheet that would force it to open maximized (both program window and file window) each time it opens, regardless of the last window state used by Excel by that user?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Force maximized (Office 2007)

    I assume that you want the Excel window to be maximized (i.e. fill the entire screen).

    Press Alt+F11 to activate the Visual Basic Editor.
    Double-click the ThisWorkbook item for the relevant workbook in the project explorer on the left hand side of the Visual Basic Editor.
    Enter or copy the following code into the module that appears.

    Private Sub Workbook_Open()
    Application.WindowState = xlMaximized
    End Sub

    Users will have to trust/enable macros in the workbook, otherwise the code won't run.

  3. #3
    2 Star Lounger
    Join Date
    May 2001
    Location
    Wichita, Kansas, USA
    Posts
    177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Force maximized (Office 2007)

    Thank you, Hans! We will test this.

    Macros are already trusted/enabled, as well as links, as this is an Excel file linked from our Sharepoint site, for internal users. Group policy already has those trust settings like that, due to other things in the worksheet.

    Thanks again so much

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •