JohnTester
New Member
- Joined
- Sep 25, 2018
- Messages
- 9
Hello everyone.
I have read so many forums looking for a solution but could not find one.
I have Checkboxes in Col H. When they are checked they copy the corresponding Row Range A:R from "Sales Record new" (Sales Orders) to "Labour" (Open Labour). Each Workbook is in different folders.
Problem 1: I have linked the Checkboxes to their corresponding cells but when ticked I get an error "Cannot run Macro"Sales Record new.xlsm'!CheckBox1154_Click'. The Macro may not be available in this workbook or all macros may be disabled."
Problem 2: I have ALLOT of Checkboxes that need a value assigned to them - True or False. depending on whether they are ticked or not.
Problem 3: Copying the Ticked (True) CB's row to another workbook.
this is the current code I use in Macros..
I have read so many forums looking for a solution but could not find one.
I have Checkboxes in Col H. When they are checked they copy the corresponding Row Range A:R from "Sales Record new" (Sales Orders) to "Labour" (Open Labour). Each Workbook is in different folders.
Problem 1: I have linked the Checkboxes to their corresponding cells but when ticked I get an error "Cannot run Macro"Sales Record new.xlsm'!CheckBox1154_Click'. The Macro may not be available in this workbook or all macros may be disabled."
Problem 2: I have ALLOT of Checkboxes that need a value assigned to them - True or False. depending on whether they are ticked or not.
Problem 3: Copying the Ticked (True) CB's row to another workbook.
Sales Records new.xlsm | |||
---|---|---|---|
I | |||
456 | |||
Sales Orders |
this is the current code I use in Macros..
Rich (BB code):
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("B:B,D:D,F:F,K:K,M:M,P:P,R:R,T:T")) Is Nothing Then Exit Sub
Select Case Target.Column
Case Is = 2, 4, 11, 13, 16, 18
Target.Offset(, -1) = Format(Date, "mm-dd-yyyy")
Case Is = 19
If Target = "YES" Then
Target.EntireRow.Copy Sheets("POD").Cells(Sheets("POD").Rows.Count, "A").End(xlUp).Offset(1)
Rows(Target.Row).Delete
End If
Case Is = 6
If Target = "LABOUR" Then
Target.EntireRow.Copy Sheets("Labour").Cells(Sheets("Labour").Rows.Count, "A").End(xlUp).Offset(1)
Rows(Target.Row).Delete
ElseIf Target = "TRAVELLING" Then
Target.EntireRow.Copy Sheets("Labour").Cells(Sheets("Labour").Rows.Count, "A").End(xlUp).Offset(1)
Rows(Target.Row).Delete
ElseIf Target = "CONSUMABLES" Then
Target.EntireRow.Copy Sheets("Labour").Cells(Sheets("Labour").Rows.Count, "A").End(xlUp).Offset(1)
Rows(Target.Row).Delete
ElseIf Target = "INSTALLATION" Then
Target.EntireRow.Copy Sheets("Labour").Cells(Sheets("Labour").Rows.Count, "A").End(xlUp).Offset(1)
Rows(Target.Row).Delete
ElseIf Target = "COMMISSIONING" Then
Target.EntireRow.Copy Sheets("Labour").Cells(Sheets("Labour").Rows.Count, "A").End(xlUp).Offset(1)
Rows(Target.Row).Delete
End If
End Select
Application.ScreenUpdating = True
End Sub