Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change event
In a
Private Sub Worksheet_Change(ByVal Target As Range) procedure the Target variables returns the cell just left only if it has been changed. I need this cell's row number even if it has NOT been changed. Is there any way? Thanks Stefi |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change event
Hi
the nature of this event is that it is only triggered then a change occurs. Maybe you could describe what you're trying to achieve with this information "Stefi" wrote: In a Private Sub Worksheet_Change(ByVal Target As Range) procedure the Target variables returns the cell just left only if it has been changed. I need this cell's row number even if it has NOT been changed. Is there any way? Thanks Stefi |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change event
You would need to use the selectionchange event and store the value in a
static variable: Private Sub Worksheet_SelectionChange(ByVal Target As Range) Static OldTarget As Range If Not OldTarget Is Nothing Then MsgBox OldTarget.Row End If Set OldTarget = Target End Sub OldTarget would be the last cell selected. Depending on what you are doing, you may need to make that variable public in the sheet module and initialize with other events - because it will not be initialized on the first selection by the user. -- Regards, Tom Ogilvy "Stefi" wrote in message ... In a Private Sub Worksheet_Change(ByVal Target As Range) procedure the Target variables returns the cell just left only if it has been changed. I need this cell's row number even if it has NOT been changed. Is there any way? Thanks Stefi |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Change Cell from Validated List Not Firing Worksheet Change Event | Excel Programming | |||
Chart Values that change based on Change event | Excel Programming | |||
Change minimumscale with the change event of a combobox | Excel Programming | |||
On change event | Excel Programming | |||
change event/after update event?? | Excel Programming |