View Full Version : Sleeper: Move Cursor Of Second Sheet As Per The First Sheet
ilyaskazi
05-25-2005, 02:57 AM
Move cursor of second sheet as per the first sheet
In my workbook, sheets are as follows..
FARES1, FARES2, CONDITIONS1, CONDITIONS2, UPSELL1, UPSELL2, RULES1, RULES2, VALIDITY1, VALIDITY2, ROUTING1, ROUTING2, ZONES1, ZONES2.
Likewise applies in all.
Means if Range ("A1") is selected on FARES1, then select same in FARES2.
Plz note: Sheets may contains by any names.
Bob Phillips
05-25-2005, 03:20 AM
What a strange request!
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
Dim ws As Worksheet
On Error GoTo ws_exit:
Application.EnableEvents = False
If IsNumeric(Right(Sh.Name, 1)) Then
For Each ws In ThisWorkbook.Worksheets
If IsNumeric(Right(ws.Name, 1)) Then
If UCase(Left(ws.Name, Len(ws.Name) - 1)) = _
UCase(Left(Sh.Name, Len(Sh.Name) - 1)) Then
If ws.Name <> Sh.Name Then
ws.Activate
ws.Range(Target.Address).Select
Sh.Activate
End If
End If
End If
Next ws
End If
ws_exit:
Application.EnableEvents = True
End Sub
This is workbook event code. To input this code, right click on the Excel icon on the worksheet (or next to the File menu if you maximise your workbooks), select View Code from the menu, and paste the code
ilyaskazi
05-25-2005, 03:43 AM
Working perfect.
But it is not scrolling the window so as to easily view the data of the particular sheets
Regouin
05-25-2005, 06:47 AM
If you press the button marked 'Caps Lock' it stops typing in capitals, it's a miracle you should try it out one time :P
ilyaskazi
05-26-2005, 04:22 AM
can v get zoom view and sroll view also???
ilyaskazi
05-30-2005, 08:26 PM
can v get zoom view and sroll view also???
But required the output if only sheet is selected.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.