-2

I am looking for the correct macro to program a radio button "checkmark" in A1 to, if checked, copy/share all following fields in that row 1 to another worksheet. I need that destination worksheet to complile a complete list of all items "checked" in the other worksheets... Any help GREATLY appreciated.

pnuts
  • 58,317
  • 11
  • 87
  • 139
RDD3326
  • 7
  • 1
  • 1
    What have you tried so far? SO is not a code outsourcing platform. Please read http://stackoverflow.com/help/on-topic for more info. – Chrismas007 Dec 02 '14 at 15:36
  • Ive tried a few that I have found online but none work to specifically copy the entire row to another worksheet compiling a list of the results. Most of what I have found available online is based on data being entered into the triggering cell (like "yes", "no", etc.) I can't figure out how to trigger it by the radio button checkmark. – RDD3326 Dec 02 '14 at 15:46
  • 1
    Simple Google for "How do I copy the entire row": http://stackoverflow.com/questions/25271683/copy-and-paste-entire-row-vba – Chrismas007 Dec 02 '14 at 15:51

1 Answers1

1

A quick high level, since your question is terribly broad:

  1. Add a new checkbox form object on your sheet.
  2. Link that checkbox to the cell behind it by Right-Click>>Format Control>>Control>>Cell Link:
  3. Create a worksheet_change event macro in the Worksheet's vba window that only acts when that particular cell is changed
  4. In that bit of code write the bit to copy the row (something like target.entirerow.copy destination:=Sheet2.Range("A" & target.row))
  5. _
  6. Profit

You'll have to repeat for every row on which you want a checkbox, so this might get a bit tedious, so you may also want to explore how to dynamically add checkboxes to the sheet for each row you have. There's also other ways of doing this with activeX controls, but this seems like a nice use for form controls.

Once you get into the nitty gritty and have a more specific question like "I have a cell A1 that will get a value of either TRUE or FALSE. When it changes I want to trigger a macro in which I will copy that row. How would I trigger that macro when the cell value changes", then toss it on SO.

JNevill
  • 46,980
  • 4
  • 38
  • 63