Radio Button
Hi zak,
Let me put in steps what you should do. I hope this will help
1. Put a Button control on the Userform
2. Name the Button BtnSaveInfo
3 Change the Caption of the button to something descriptive maybe 'Save' or
'Save Info'
4. Double click the button
5. enter the follwing code in step 6 between the follwing code lines
Private Sub BtnSaveInfo_Click()
End Sub
6. Code to enter behind the button
Dim Sht As Worksheet
If OptionButton1.Value = True Then
Set Sht = ThisWorkbook.Worksheets("Laptop1")
Else
Set Sht = ThisWorkbook.Worksheets("Laptop2")
End If
Sht.Range("A1").Value = TextBox1.Text
Hope this helps,
--
A. Ch. Eirinberg
"zak" wrote:
Hi
I have a form with 2 radio buttons; one for Laptop 1 and the other for
Laptop 2. Also on the form are some text input fields which is generic to
both laptop 1 and 2.
My question is, based on the radio button selected, i'd like to copy the
information entered into the text fields on the form to the respective
worksheet (worksheet Laptop 1 or worksheet Laptop 2).
I'm not sure how to say If radio button 1 is selected,then write the info to
worksheet Laptop 1 or If radio button 2 is selected then write the info to
worksheet Laptop 2.
I look forward to any help. Thank you
|