Macro to Display Each Sheet in Workbook in a Separate Window

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 the 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.00c howto

Keywords : kbprg
Version : MACINTOSH:5.0; WINDOWS:5.0,5.0c,7.0; winnt:5.0
Platform : MACINTOSH WINDOWS winnt
Issue type :


Last Reviewed: October 22, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.