D
Dan
Hi all -
I am getting a Compile error: Ambigious name detected: Worksheet_Change
message when processing my code.
In my code below, how can I combine these procedures so I can make this
work? Thanks for your help!
'-----------------------------------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
'-----------------------------------------------------------------
Const WS_RANGE As String = "d5"
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
Range("c6:c24").Copy Range("c7:c25")
Range("c6").Value = Target.Value
End If
ws_exit:
Application.EnableEvents = True
End Sub
'-----------------------------------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
'-----------------------------------------------------------------
Const WS_RANGE As String = "q5"
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
Range("p624").Copy Range("p725")
Range("p6").Value = Target.Value
End If
ws_exit:
Application.EnableEvents = True
End Sub
I am getting a Compile error: Ambigious name detected: Worksheet_Change
message when processing my code.
Worksheet_Change process once.From reading various posts, I see that I can only use the
In my code below, how can I combine these procedures so I can make this
work? Thanks for your help!
'-----------------------------------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
'-----------------------------------------------------------------
Const WS_RANGE As String = "d5"
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
Range("c6:c24").Copy Range("c7:c25")
Range("c6").Value = Target.Value
End If
ws_exit:
Application.EnableEvents = True
End Sub
'-----------------------------------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
'-----------------------------------------------------------------
Const WS_RANGE As String = "q5"
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
Range("p624").Copy Range("p725")
Range("p6").Value = Target.Value
End If
ws_exit:
Application.EnableEvents = True
End Sub