I have this string of VBA code in Sheet3(WIP), the first "Option Explicit" runs as written.
The next VBA code runs as written
However the bottom VBA code "Option Explicit" very similar but for reason it doesn't run as written, I get no error message. maybe there is a conflict with two VBA codes essentially the same with different targets.
Hope you can help
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Columns("Q")) Is Nothing Then Exit Sub
If Target.Value = vbNullString Then Exit Sub
Dim ws As Worksheet: Set ws = Sheets("CHANGE ORDERS")
If Target.Value = "YES" Then
Range(Cells(Target.Row, "C"), Cells(Target.Row, "O")).Copy ws.Range("C" & Rows.Count).End(3)(2)
End If
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Application.CutCopyMode = False Then
Application.Calculate
End If
End Sub
Private Sub Worksheet(ByVal Target As Range)
If Intersect(Target, Columns("R")) Is Nothing Then Exit Sub
If Target.Value = vbNullString Then Exit Sub
Dim ws As Worksheet: Set ws = Sheets("REWORK")
If Target.Value = "YES" Then
Range(Cells(Target.Row, "C"), Cells(Target.Row, "M")).Copy ws.Range("C" & Rows.Count).End(3)(2)
End If
End Sub
The next VBA code runs as written
However the bottom VBA code "Option Explicit" very similar but for reason it doesn't run as written, I get no error message. maybe there is a conflict with two VBA codes essentially the same with different targets.
Hope you can help
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Columns("Q")) Is Nothing Then Exit Sub
If Target.Value = vbNullString Then Exit Sub
Dim ws As Worksheet: Set ws = Sheets("CHANGE ORDERS")
If Target.Value = "YES" Then
Range(Cells(Target.Row, "C"), Cells(Target.Row, "O")).Copy ws.Range("C" & Rows.Count).End(3)(2)
End If
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Application.CutCopyMode = False Then
Application.Calculate
End If
End Sub
Private Sub Worksheet(ByVal Target As Range)
If Intersect(Target, Columns("R")) Is Nothing Then Exit Sub
If Target.Value = vbNullString Then Exit Sub
Dim ws As Worksheet: Set ws = Sheets("REWORK")
If Target.Value = "YES" Then
Range(Cells(Target.Row, "C"), Cells(Target.Row, "M")).Copy ws.Range("C" & Rows.Count).End(3)(2)
End If
End Sub