Can't Synchronize Windows By Choosing Arrange All (119718)



The information in this article applies to:

  • Microsoft Excel 97 for Windows

This article was previously published under Q119718

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. 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.

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()

Modification Type:MajorLast Reviewed:6/23/2005
Keywords:kbProgramming KB119718