XL: Can't Synchronize Windows By Choosing Arrange All

Last reviewed: May 30, 1997
Article ID: Q119718
5.00 5.00c 7.00 97 WINDOWS kbusage kbcode kbmacro

The information in this article applies to:

  • Microsoft Excel for Windows, versions 5.0, 5.0c
  • Microsoft Excel for Windows 95, version 7.0
  • Microsoft Excel 97 for Windows

SUMMARY

In Microsoft Excel, you cannot synchronize windows horizontally or vertically by choosing Arrange from the Window menu. However, you can accomplish this by creating a Microsoft Excel or Visual Basic, Applications Edition, macro.

MORE INFORMATION

The following macros assume that a second window for the worksheet has been opened by choosing New Window from the Window menu.

Visual Basic Macro

Sub Sync_On()
   'Enables horizontal and vertical window synchronization
   Application.Windows.Arrange arrangestyle:=xlTiled, _
   ActiveWorkbook:=True, synchorizontal:=True, syncvertical:=True
End Sub

Sub Sync_Off()
   'Disables horizontal and vertical window synchronization
   Application.Windows.Arrange arrangestyle:=xlTiled, _
   ActiveWorkbook:=True, synchorizontal:=False, syncvertical:=False
End Sub

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. Note that a line that is preceded by an apostrophe introduces a comment in the code--comments are provided to explain what the code is doing at a particular point in the procedure. Note also that an underscore character (_) indicates that code continues from one line to the next. You can type lines that contain this character as one logical line or you can divide the lines of code and include the line continuation character. For more information about Visual Basic for Applications programming style, see the "Programming Style in This Manual" section in the "Document Conventions" section of the "Visual Basic User's Guide."

Microsoft Excel 4.0 Macro

Sync_On

'Enables horizontal and vertical window synchronization
=ARRANGE.ALL(1,TRUE,TRUE,TRUE) =RETURN()

Sync_Off

'Disables horizontal and vertical window synchronization
=ARRANGE.ALL(1,TRUE,FALSE,FALSE) =RETURN()


Additional reference words: 97 7.00 5.00 sync hsync vsync XL97

Keywords : kbprg PgmHowTo PgmOthr xlmhowto xlui xlvbahowto kbcode kbmacro kbusage
Version : 5.00 5.00c 7.00 97
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: May 30, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.