Hi Members
After a couple of research I was able to make the code below, where basically I need the macro to run either the change happen in cell A5 or G23, but when I run it I got "Ambigous Name Deteted" error. Also in the same worksheet I have another Worksheet Change event, so I don't know if I have to group all the changes in one Sub or if I have to open a Sube per each change.
As working for me with Targets is sort of a new thing I'm not familiar what I'm doing wrong. Any assistance will be more than welcome. Thanks.
After a couple of research I was able to make the code below, where basically I need the macro to run either the change happen in cell A5 or G23, but when I run it I got "Ambigous Name Deteted" error. Also in the same worksheet I have another Worksheet Change event, so I don't know if I have to group all the changes in one Sub or if I have to open a Sube per each change.
Code:
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim CriticalCells As Range
Set CriticalCells = Range("A5", "G23")
If Application.Intersect(Target, CriticalCells).Address = Target.Address Then
If Target.Value <> "" Then
Select Case Target.Value
Case "Código de Compañía"
Call CtaCtrl
Case "Company Code"
Call CtaCtrlEng
End Select
End If
End Sub
As working for me with Targets is sort of a new thing I'm not familiar what I'm doing wrong. Any assistance will be more than welcome. Thanks.