Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2009
    Posts
    15

    Unanswered: My Excel Read-Only file will not open in maximized view.

    This is merely a query in cosmetics, but it's driving me crazy a little bit and I was wondering if you may have a solution for this.

    I have made an Excel file and saved it as Read-Only. But it ONLY opens up in a view that's NOT maximized. The Excel program window is maximized, but not the file.

    Any MS Office file that you open, opens up in the last setting that you closed it. IE: If you closed it and the window was maximized, then it opens maximized. And if it was closed in NOT maxed view, then it opens that way as well. But that's not happening with this one particular file and it is really irritating.

    Any ideas???

  2. #2
    Join Date
    Sep 2008
    Location
    London, UK
    Posts
    511
    Hi,

    Sounds very frustrating!
    Any MS Office file that you open, opens up in the last setting that you closed it. IE: If you closed it and the window was maximized, then it opens maximized. And if it was closed in NOT maxed view, then it opens that way as well.
    This theory might not be 100% correct because it's contradicted by this MS Support article:
    In the versions of Microsoft Excel listed above, the state in which a window is opened is based on the state of the last window that was closed. Because of this behavior, you may find that files that were saved in a restored state are opened in a maximized state, and vice versa.

    Whether or not a window is maximized when you open it is an attribute of the Microsoft Excel workspace. An exception to this is if the workbook's window has been protected.
    So it's the state of the last window that was closed that determines the state of the next opened window.

    Try opening a new workbook, maximising its window and closing it without saving. Then try opening your read-only Excel file. Unless the read-only Excel file has protected window structure then it should open maximised.

    Fingers crossed!

  3. #3
    Join Date
    Mar 2009
    Posts
    15

    WIERD!!! That does not work if opened as hyperlink from Access form

    I actually encourage anyone now to try this to see for themselves.

    COLIN,

    Thanks for your attention to this. I tried what you said, and it is no problem at all if I open the file from a windows folder. However, the problem still exists if that same file is opened from a hyperlink on an Access form.

    So, to be very clear, with the excel file in question, I created/saved as a new file, READ-ONLY. And I opened it many times, and every time, it opened up as I last closed it. And then a couple of times in max size at the end.

    But then in my access file, I create a hyperlink to this new Read-Only file that I KNOW opens in max view. But when I press on that link, the correct file opens, BUT NOT AS MAX VIEW. The MS Excel window is maxed, but the file is a half-sized rectangle towards the top of the Excel window now. And it just keeps opening up like that.

    And it gets weirder. Now, going back to the windows folder, if I try opening it up from there, it now opens THE SAME WAY as the access form hyperlink, no matter if I maxed the window in the last view before closing.

    I understand the statement from MS about the file opening up in the last view it was closed, but I seem to now be proving it wrong.

    I encourage you to see for yourself how it works for you. Maybe it's some security setting on my computer, but I doubt it. I think this has something to do with an Excel read-only file incompatibility with access.

    I really have no logical reasoning as to why this is occurring like this.

  4. #4
    Join Date
    Sep 2008
    Location
    London, UK
    Posts
    511
    Hi,
    But then in my access file, I create a hyperlink
    This makes a little more sense now: you are opening the file via a hyperlink from another application. Speaking from my own experience, a restored window state on the target file is standard (by design) behaviour for hyperlinks?
    So, to be very clear, with the excel file in question, I created/saved as a new file, READ-ONLY. And I opened it many times, and every time, it opened up as I last closed it. And then a couple of times in max size at the end.
    I think you know this, but just to emphasise the point: the window state of the opened file is determined by the window state of the previously closed file - it is not determined by the window state of that file when it was last closed. In this scenario it is just coincidence that the last closed file happens to be the one you are opening, so the two are the same. Of course, as you have observed, hyperlinks override this.
    And it gets weirder. Now, going back to the windows folder, if I try opening it up from there, it now opens THE SAME WAY as the access form hyperlink, no matter if I maxed the window in the last view before closing.
    Via MS Access, the file was opened and closed in a restored state. Since the last closed file's window was restored, the next file that is opened in that Excel instance will also be restored, which is what I think you are seeing here.


    I don't know how to change the hyperlink behaviour to open files in a maximised state, but the good news is that there are some workarounds. Here are two options:
    [1] Rather than using a hyperlink, open the file via another means. eg. MS Access VBA code behind a control.
    [2] Add a Workbook_Open() event handler into your read-only workbook which maximises the workbook window when it is opened. eg.
    Code:
    Private Sub Workbook_Open()
        If Not ProtectWindows Then Windows(1).WindowState = xlMaximized
    End Sub
    Hope that helps...

Posting Permissions

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