Hello All
I have a worksheet change event already in place but now also want to add another change event that is totally independant to the first but is also in the same worksheet. I've tried just inserting the 2nd one after the 1st but it doesn't like it and comes up with a message box that says 'Compile error: ambiguous name detected: Worksheet_Change'
Please could someone help with how to do this - both macros are listed below:
1st (original) Macro:
Private Sub Worksheet_Change(ByVal Target As Range)
' 01 Aug 2018
With Target
If .Address = "$D$1" Then RenameTab .Value
End With
End Sub
2nd (New) macro:
Private Sub Worksheet_Change(ByVal Target As Range)
'return different value from dropdown list
selectedNa = Target.Value
If Target.Column = 3 Then
selectedNum = Application.VLookup(selectedNa, ActiveSheet.Range("ContractList"), 2, False)
If Not IsError(selectedNum) Then
Target.Value = selectedNum
End If
End If
End Sub
Many thanks in advance