Click here to Skip to main content
15,896,201 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
In Excel 2003 any events are there???which matches with Cell_leave event

Thank U for ur replies..
Posted

1 solution

You can try to use selectionChange event.

You can evaluate which cell has current focus and keep track of last cell range that had focus prior to the current cell range.

VB
Private Sub Worksheet_SelectionChange(ByVal currentRange As Range)
Static lastRange As Range
    If Not lastRange Is Nothing Then
        If lastRange.Address = "$A$1" Then
            'Run Code
        End If
    End If
    Set lastRange = currentRange
End Sub


Regards
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900