P
Pratik Mehta
Friends,
I am using Excel VBA to keep track of depedent cells.
In a certain scenario, if any cell is getting changed and
it is having any depedent cells, I want to set focus to
that depedent cells. I am using Change event to achieve
the same functionality. Code snippet is like below:
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo errHandler:
Target.Dependents.Activate
Exit Sub
errHandler:
Application.StatusBar = Err.Description
End Sub
It works fine if depedent cells are in the same sheet.
But, if depedent cell is in other sheet and/or workbook.
It is not working and giving error like "No Cells were
found"!.
Please guide me how can I do that?
I am using Excel VBA to keep track of depedent cells.
In a certain scenario, if any cell is getting changed and
it is having any depedent cells, I want to set focus to
that depedent cells. I am using Change event to achieve
the same functionality. Code snippet is like below:
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo errHandler:
Target.Dependents.Activate
Exit Sub
errHandler:
Application.StatusBar = Err.Description
End Sub
It works fine if depedent cells are in the same sheet.
But, if depedent cell is in other sheet and/or workbook.
It is not working and giving error like "No Cells were
found"!.
Please guide me how can I do that?