Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code to run on worksheet selection change
I am programming code to run whenever the user changes
cells within an excel spreadsheet. How can I have the code check to see what cell the user just selected, assign this to a variable, then run a select case statement on that variable? Here's where I am so far: Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range) Dim CurrentRange As Range 'CurrentRange = ********This is where I need help, assigning the variable********** Select Case CurrentRange Case... 'do stuff depending on which cell is selected Case... ' End Select End Sub Any help is much appreciated. Dan Winterton |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Quick VBA Worksheet Change Event or Selection Question: | Excel Worksheet Functions | |||
CHANGE DEFAULT PRINT TO SELECTION INSTEAD OF ACTIVE WORKSHEET | New Users to Excel | |||
Running code on a drop down selection change | Excel Worksheet Functions | |||
Worksheet change code | Excel Programming | |||
Worksheet Selection Change | Excel Programming |