Dear Gents,
According to above codes, If the user change the value of B2 to B5 and press "tab" on keyboard
, the activecell.column will be 2. But if the user click other cells instead of press tab, the activecell.column
will not be 2.
Please help me to figure out how to get the changed cell's row or column if user didn't press "tab" key in this condition.
Thanks.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Target, Range("B2:B5")) Is Nothing Then
Cancel = True
ActCol = Activecell.Column
'other macro
, the activecell.column will be 2. But if the user click other cells instead of press tab, the activecell.column
will not be 2.
Please help me to figure out how to get the changed cell's row or column if user didn't press "tab" key in this condition.
Thanks.
Last edited: