Article ID: 134829
Article Last Modified on 10/11/2006
Sub AlignSheets()
' Remember which sheet was on top.
Set TopSheet = ActiveSheet
' Do not update the screen until the end of the routine.
Application.ScreenUpdating = False
' Store the sheet's position.
TopRow = ActiveWindow.VisibleRange.Row
LeftColumn = ActiveWindow.VisibleRange.Column
' Loop through each worksheet in the total worksheets.
For Each xPage In Worksheets
' Activate worksheet.
xPage.Activate
' Scroll the active sheet to the stored position.
ActiveWindow.ScrollRow = TopRow
ActiveWindow.ScrollColumn = LeftColumn
' Get the next worksheet.
Next xPage
' Restore the original sheet.
TopSheet.Activate
End Sub
Additional query words: 5.00a 5.00c 7.00a XL98 XL97 XL7 XL5 XL
Keywords: kbdtacode kbhowto kbprogramming KB134829