Workspace Doesn't Retain Window Size
Article ID: 160264
Article Last Modified on 8/17/2005
APPLIES TO
- Microsoft Excel 97 Standard Edition
- Microsoft Excel 95 Standard Edition
- Microsoft Excel 5.0 Standard Edition
- Microsoft Excel 98 for Macintosh
This article was previously published under Q160264
SYMPTOMS
When you open a workspace (*.xlw) file in Microsoft Excel, the window
state is not retained. Instead, the windows appear in the restored state.
CAUSE
This problem occurs when you maximize the windows in a workspace, save the
workspace file, and then reopen the file.
WORKAROUND
To open a workspace file with maximized windows, use either of the
following methods:
- Manually maximize the active window by clicking the Maximize button in
the upper-right corner of the document window.
-or-
- Create a Visual Basic for Applications macro that automatically
maximizes the active window when you open the workbook.
Macro Example
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.
The following sample macro runs automatically when you open the workbook,
and maximizes the window.
Sub Auto_Open()
ActiveWindow.WindowState = xlMaximized
End Sub
Additional query words: XL98 98 XL97 97 8.00 5.00a 5.00c XL
Keywords: kbualink97 kbprogramming kbprb kbcode KB160264