Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selection Change Event...
Hi All
Does anyone knows if on a "Selection Change" event I can retrieve the previos active cell??? say I'm on A1 and then I hit the Left arrow towards A2, is there a way to know that previosly I was in A1. What if I'm in A1 and then I go directly to C10 with the mouse, once the selection change occurs, is it possible to now what the seleciton was before?? Any help is greatly appreciated... Regards JS |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selection Change Event...
Hi
you have to store the old cell in a static variable. something like Private Sub Worksheet_SelectionChange(ByVal Target As Range) static old_range as range if old_range is nothing then set old_range = target else 'do your code msgbox "Old cell: " & old_range.address end if set old_range = target End Sub -- Regards Frank Kabel Frankfurt, Germany Juan Sanchez wrote: Hi All Does anyone knows if on a "Selection Change" event I can retrieve the previos active cell??? say I'm on A1 and then I hit the Left arrow towards A2, is there a way to know that previosly I was in A1. What if I'm in A1 and then I go directly to C10 with the mouse, once the selection change occurs, is it possible to now what the seleciton was before?? Any help is greatly appreciated... Regards JS |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Quick VBA Worksheet Change Event or Selection Question: | Excel Worksheet Functions | |||
How to use selection change instead of double click event? | Excel Discussion (Misc queries) | |||
Chart Values that change based on Change event | Excel Programming | |||
change event/after update event?? | Excel Programming | |||
Autofilter.Selection - After Change Event??? | Excel Programming |