I have a value in A3 and B3. I want to put it on sheet 2 when I check or use a radio button in C3 sheet 1. If it is not checked remove it from sheet 2.
Thanks Reddog.
I have a value in A3 and B3. I want to put it on sheet 2 when I check or use a radio button in C3 sheet 1. If it is not checked remove it from sheet 2.
Thanks Reddog.
I do not recommend using a radio button, I would use a checkbox
Create a checkbox and add the following code to your checkbox control
[VBA]
Private Sub CheckBox1_Click()
Dim WS1 As Worksheet
Dim WS2 As Worksheet
Set WS1 = Worksheets("Sheet1")
Set WS2 = Worksheets("Sheet2")
Select Case Me.CheckBox1.Value
Case True
WS2.Range("A3:B3").Value = WS1.Range("A3:B3").Value
WS1.Range("A3:B3") = ""
Case Else
WS2.Range("A3:B3") = ""
End Select
End Sub
[/VBA]
I haven't had much time play with this. I'm problems with the ME part of the code. I will try again tonight and try to put the workbook on to.Originally Posted by JKwan
Thanks reddog
Is your problem solved? If not please add some more details because i have not understood it clearly. But if its solved then that's fine.
The code goes in the "ThisWorkbook" code page.
Put the cursor in the word "Me" and press F1 for help on "Me."
I expect the student to do their homework and find all the errrors I leeve in.
Please take the time to read the Forum FAQ
or
[vba]Private Sub CheckBox1_Click()
With Sheets("Sheet2").Range("A3:B3")
.Clearcontents
if CheckBox1.Value Then .Value = Sheets("Sheet1").Range("A3:B3").Value
End With
End Sub[/vba]
I'm still having troubles. I really don't know what I'm doing. Sheet 1 has the field numbers and the gallons per minute in A3 B3 down to A47 B47. In column C I want a checkbox for each field. If the checkbox is checked I want to add it to sheet2. If it's unchecked remove it from sheet2. Column D is what crop that field has. The back ground color I would like that to go to sheet2 also from A3 to Q3. I don't know what I did in A11 where there is a drop down list but I don't want it. I will add my workbook again so you all can look at it. I'll try to post a picture of what sheet 2 will look like also. What's common sense to all of you isn't to me, so try make it so my 3 year old grand daughter can understand then I might have a chance.
Thanks Stacey
Looks like I will make another post of sheet2
Here is what sheet2 will look like. I colored just some of the rows for an example. A1:A47 is all I want to change. The rest would stay the same.
Hope this make sense.
Thanks Stacey
Before turning to your granddaughter try to stumble across 'VBA for dummies' or an equivalent book and swallow that.
After that we are much better able to help you.