Copy row from Workbook to another when Checkbox is checked

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.

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
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

Forum statistics

Threads
1,223,884
Messages
6,175,174
Members
452,615
Latest member
bogeys2birdies

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top