VBA to copy specific data after check box is selected

niailmar

New member
Joined
Apr 4, 2012
Messages
30
Reaction score
0
Points
0
Hello,

I have one worksheet that have list of data. Each row of the sheet have check box button at the end of column.

Here's one I have never satisfactorily solved: how to copy specific data in different column on each line/row in a sheet, if check box button is selected and copy to another worksheet.


I'm at a loss at how to do it, and would very much appreciate any hints.

Regards,

Nia
 
Record a macro. Example: From sheet1 I want to copy data from C2:C26 to Sheet 2. Very simple I would record macro: select C2:C26, select sheet 2, click the cell you want to start pasting the data than paste. Stop recording. On the check box right click. Menu will appar.Click Assign Macro. This will promt to select the macro you want to assign. Next time you click to check the box the macro will do the job. See simple example below. Let me know if this is what you are looking for. Thanks.
Sub Copy()
Range("C2:C25").Select
Selection.Copy
Sheets("2").Select
Range("B3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("B12").Select
Application.CutCopyMode = False
End Sub
 
Back
Top