How to retrieve the last selected cell before SelectionChange even
Hi Frank
Here's a way to do it:
Dim LastSelected As String
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Intersect(Target(1, 1), Range("m1:m1")) Is Nothing Then GoTo XIT
MsgBox LastSelected
'...
XIT:
LastSelected = Target.Address
End Sub
Regards,
Per
"Frank Krogh" skrev i meddelelsen
...
I am using the SelectionChange event like this:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Intersect(Target(1, 1), Range("m1:m1")) Is Nothing Then Exit Sub
...
End Sub
My question is if it's a way to retrieve which cell was selected before
the
M1 cell is selected?
Regards
Frank Krogh
|