Hello
Im new to vba and i am getting Compile Error: Ambiguous name detected
any help would be Appreciated
Cheers
Im new to vba and i am getting Compile Error: Ambiguous name detected
any help would be Appreciated
Cheers
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rngDest As Range
Set rngDest = Worksheets("Archive").Range("rngDest")
If Not Intersect(Target, Worksheets("Active").Range("rngTrigger")) Is Nothing Then
If IsDate(Target) Then
Application.EnableEvents = False
Target.EntireRow.Select
Selection.Cut
rngDest.Insert Shift:=xlDown
Selection.Delete
Application.EnableEvents = True
End If
End If
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rngDest2 As Range
Set rngDest2 = Worksheets("HoldingBay").Range("rngDest2")
If Not Intersect(Target, Worksheets("Active").Range("rngTrigger2")) Is Nothing Then
If IsDate(Target) Then
Application.EnableEvents = False
Target.EntireRow.Select
Selection.Cut
rngDest2.Insert Shift:=xlDown
Selection.Delete
Application.EnableEvents = True
End If
End If
End Sub