Home |
Search |
Today's Posts |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Based the example below, C1:C10 are copied to G1:G10.
When unchecked, G1:G10 are set to blank. I don't what range you copied so you need to adjust the RESIZE parameter to reflect ROWS and COLUMNS copied i.e Resize(rows, columns). HTH Private Sub CheckBox1_Click() If CheckBox1.Value = True Then Worksheets("Sheet1").Range("C1:C10").Copy Worksheets("Sheet2").Range("G1") Else ' not clicked .... Worksheets("Sheet2").Range("G1").Resize(10, 1) = " " End If End Sub "Robb27" wrote: Toppers, Well, I mean: When you check the box (my original post) it copies the row to another sheet. What if I uncheck the box? - I want to row that was copied to the other sheet to go away. Basically "undoing" the initial process of checking the box. I appreciate your help. Robb "Toppers" wrote: Robb, What do you mean by "undo" (what my first question was )? Like this ? Private Sub CheckBox1_Click() If CheckBox1.Value = True Then Worksheets("Sheet1").Range("C1:C10").Copy Worksheets("Sheet2").Range("G1") Else ' not clicked .... ' Whatever "undo" means ......... End If End Sub "Robb27" wrote: Thanks for your response Toppers. One more question please. How do you undo what my first question was if I uncheck the box? Robb "Toppers" wrote: Hi, Look at Ron de Bruin's site which has an add-in for E-mailing workbooks/worksheets. http://www.rondebruin.nl/mail/add-in.htm HTH "Robb27" wrote: Toppers, It worked! (of course it did) Many thanks! Now, If you could give me one more that would allow a user to click a radio button and email a just a particular sheet...not the entire workbook, that would be cool! Thanks again for your valuable time. "Toppers" wrote: Rob, Private Sub CheckBox1_Click() If CheckBox1.Value = True Then Worksheets("Sheet1").Range("C1:C10").Copy Worksheets("Sheet2").Range("G1") End If End Sub HTH "Robb27" wrote: I made a checkbox but I need to know how to make it when checked, it will copy a range of cells to another sheet in the same workbook. Can anyone give me a sample to get me started? Thanks in advance. Rob |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy & Paste Across Sheet Tabs in a Range of Cells | Excel Discussion (Misc queries) | |||
Macro to copy range of cells and paste into 1 sheet | Excel Programming | |||
Use macro to check a range of cells within a row and copy wanted data to new sheet | Excel Programming | |||
Use macro to check a range of cells within a row and copy wanted data to new sheet | Excel Programming | |||
Use macro to check a range of cells within a row and copy wanted data to new sheet | Excel Programming |