Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello Excel Experts.
How can I perameterise this code so it selects the row and column of whichever cell I click on? As the code stands it will only work if I click on C4 or D13. Thanks for your help. Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim CurrRow, CurrCol CurrRow = ActiveCell.Row ' Get Row. CurrCol = ActiveCell.Column ' Get Column. If CurrRow = 4 And CurrCol = 3 Then Range("4:4,C:C").Select Range("C1").Activate End If If CurrRow = 13 And CurrCol = 4 Then Range("13:13,D:D").Select Range("D1").Activate End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how copy formula that contains ranges so ranges do not overlap | Excel Worksheet Functions | |||
Ranges and Arrays in Excel VBA | Excel Worksheet Functions | |||
Excel and ranges | Excel Worksheet Functions | |||
vba, excel, sum different ranges | Excel Worksheet Functions | |||
Excel VBA 3D Ranges | Excel Programming |