Macro that copies Checked Boxes in excel to a new sheet by clicking a Command Button

Kt999

New Member
Joined
Sep 19, 2014
Messages
2
So basically I have a list of accounts I need to send out to a client. The client will then check the boxes next to the account names that belong to them. Once they are finished checking the boxes, they will hit 'Certify' which could be a command button or a radio button or a check box, whichever is easiest.

By hitting Certify, I want the checked boxes, and their corresponding accounts, to copy into a new sheet.

An other option is that by hitting the 'Certify' button, it pops out a new form that has the checked accounts linked to it.

If anyone could help me with this it would be MUCH appreciated.

Thank you !!!!
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Hi, not sure what's the code for Checked check box so I wrote macro if there is Yes or No filled in column A

Code:
Sub copychecked()
Sheets.Add.Name = "Checked" 'creates sheet where data will be copied
Sheets("Sheet1").Activate 'assuming the source data is in Sheet1 otherwise change the name


b = 1
c = Application.CountA(Range("A:A"))


'checks which rows in column A are marked as Yes and copies them to the new sheet
Do Until b > c
If Cells(b, 1).Value = "Yes" Then
Rows(b).Copy
Sheets("Checked").Range("A65536").End(xlUp).Offset(1, 0).PasteSpecial
End If
b = b + 1
Loop


Sheets("Checked").Activate
Cells(1, 1).Select


End Sub

hope it helps
 
Upvote 0

Forum statistics

Threads
1,218,651
Messages
6,143,714
Members
450,502
Latest member
sakaria_123

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