Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
I have 25 same sheets and in everyone is included same Private Sub for cursor
movement. Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range) If Target.Address = "$G$8" Then Range("C9").Select End If .. .. .. If Target.Address = "$D$32" Then Range("I3").Select End If End Sub How can I use this macro as one for all sheets to reduce size of file. Thanks in advance. |
#2
![]() |
|||
|
|||
![]()
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Range) If Target.Address = "$G$8" Then Range("C9").Select ElseIf Target.Address = "$D$32" Then Range("I3").Select End If 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 -- HTH RP (remove nothere from the email address if mailing direct) "Booker" wrote in message ... I have 25 same sheets and in everyone is included same Private Sub for cursor movement. Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range) If Target.Address = "$G$8" Then Range("C9").Select End If . . . If Target.Address = "$D$32" Then Range("I3").Select End If End Sub How can I use this macro as one for all sheets to reduce size of file. Thanks in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to make "common factor" formula ? | Excel Worksheet Functions | |||
more than 3 conditions in conditional formatting - possible? | Excel Discussion (Misc queries) | |||
date format problem | Excel Discussion (Misc queries) | |||
Numbers from seperate worksheet to common sheet | Excel Worksheet Functions | |||
finding common numbers in large lists | Excel Worksheet Functions |