Macro to Display Each Sheet in Workbook in a Separate Window

Last reviewed: September 2, 1997
Article ID: Q136094
The information in this article applies to:
  • Microsoft Excel for Windows, versions 5.0, 5.0c
  • Microsoft Excel for Windows NT, version 5.0
  • Microsoft Excel for Macintosh, version 5.0
  • Microsoft Excel for Windows 95, version 7.0

SUMMARY

By default, Microsoft Excel displays a single sheet in the active workbook.

The "More Information" section of this article describes two ways you can display each sheet in a workbook in a separate window

MORE INFORMATION

To display each sheet manually, use the following steps:

  1. On the Window menu, click New Window.

  2. On the Window menu, click Arrange.

  3. Click the desired type of window arrangement (Tiled, Horizontal, Vertical, Cascade).

The following Visual Basic for Applications code selects and displays each sheet in a workbook in a separate window.

Sample Visual Basic Code

Microsoft provides examples of Visual Basic procedures for illustration only, without warranty either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. This Visual Basic procedure is provided 'as is' and Microsoft does not guarantee that it can be used in all situations. Microsoft does not support modifications of this procedure to suit customer requirements for a particular purpose.

Sub Tile_Workbook_Sheets()
   For Each sht In Sheets      'Loop through all sheets in the Workbook
       sht.Activate            'Activate each sheet in turn
       ActiveWindow.NewWindow  'Create a new window for each sheet
   Next sht                    'Loop until all sheets are selected
   Windows.Arrange             'Arrange all windows - defaults to "Tiled"
End Sub


Additional query words: 5.00 5.00c 7.00 howto
Keywords : kbprg PgmHowTo kbcode kbprg
Version : 5.00 5.00c 7.00
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 2, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.