XL: Can't Synchronize Windows By Choosing Arrange All

ID: Q119718


The information in this article applies to:


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 clicking New Window on 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 programming examples 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 article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals 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 needs. If you have limited programming experience, you may want to contact the Microsoft fee-based consulting line at (800) 936-5200. For more information about the support options available from Microsoft, please see the following page on the World Wide Web:

http://www.microsoft.com/support/supportnet/refguide/

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 query words: 97 sync hsync vsync XL97


Keywords          : kbprg xlui xlvbahowto xlmhowto 
Version           : WINDOWS:97,7.0,5.0,5.0c
Platform          : WINDOWS 
Issue type        : 

Last Reviewed: May 17, 1999