Simultaneous scrolling for 3 worksheets.
On Apr 23, 7:52 am, TomThumb
wrote:
It would be a real convenience for me to be able to scroll to row 159 of
spreadsheet A and then when I click on spreadsheet B or C, the scroll row is
preset to 159 on those worksheets. Any help would be greatly appreciated.
--
TomThumb
One way...
Assign these two macros to suitably captioned buttons (eg "Goto B" and
"Goto C") on a new toolbar named "Sync Scroll Row"...
Public Sub SyncToB()
Dim AScrollRow As Long
AScrollRow = ActiveWindow.ScrollRow
Worksheets("B").Activate
ActiveWindow.ScrollRow = AScrollRow
End Sub
Public Sub SyncToC()
Dim AScrollRow As Long
AScrollRow = ActiveWindow.ScrollRow
Worksheets("C").Activate
ActiveWindow.ScrollRow = AScrollRow
End Sub
Add these two Event Procedures to worksheet A...
Private Sub Worksheet_Activate()
Application.CommandBars("Sync Scroll Row").Visible = True
End Sub
Private Sub Worksheet_Deactivate()
Application.CommandBars("Sync Scroll Row").Visible = False
End Sub
The Sync Scroll Row toolbar will then only be visible in Worksheet A.
Use the toolbar to get to worksheets B and C with the same scroll row
as worksheet A.
First add the SyncToB and SyncToC macros to a general code module.
Then use go View|Toolbars|Customise... and use the Customise dialog to
make the Sync Scroll Row toolbar. Then add the Event Procedures to the
Worksheet A code module.
Ken Johnson
|