Trying to add radio buttons to an existing form

HDfatboy03

Board Regular
Joined
May 23, 2010
Messages
62
Hello

I am trying to add several radio buttons. 3 groups of 3 ... grouped as follows: The worksheet is named "CoursesDB" that's where I would like the information to go to.

combobox1 contains:
fh1 - if checked need info going to (iRow, 42) ... value to = 1 or 0
ml1 - if checked need info going to (iRow, 60) ... value to = 1 or 0
mri - if checked need info going to (iRow, 79) ... value to = 1 or 0
combobox2 contains:
fh2 - if checked need info going to (iRow, 43) ... value to = 1 or 0
ml2 - if checked need info going to (iRow, 61) ... value to = 1 or 0
mr2 - if checked need info going to (iRow, 80) ... value to = 1 or 0
combobox3 contains:
fh3 - if checked need info going to (iRow, 44) ... value to = 1 or 0
ml3 - if checked need info going to (iRow, 62) ... value to = 1 or 0
mr3 - if checked need info going to (iRow, 81) ... value to = 1 or 0

I am reading Excel 2007 Power Programming with VBA ... they make it sound so simple and here is the code they are suggesting ... but I can't seem to get it to work.

If FH1 Then Cells(iRow, 42).Value = "1"
If MR1 Then Cells(iRow, 60).Value = "1"
If ML1 Then Cells(iRow, 79).Value = "1"


'the clear command
Me.FH1.Value = ""
Me.MR1.Value = ""
Me.ML1.Value = ""

Any assistance will be greatly appreciated.

Thanks in advance

Bob
 
Thanks for the help with the radio buttons ... here is the code that is working

If FH1 = True Then
ws.Cells(iRow, 42).Value = Me.FH1.Value
ws2.Cells(9, "C").Value = Me.FH1.Value
ElseIf MR1 = True Then
ws.Cells(iRow, 60).Value = Me.MR1.Value
ws2.Cells(11, "C").Value = Me.MR1.Value
Else
ws.Cells(iRow, 79).Value = Me.ML1.Value
ws2.Cells(10, "C").Value = Me.ML1.Value
End If

thanks again

Bob
 
Upvote 0

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Forum statistics

Threads
1,223,214
Messages
6,170,771
Members
452,353
Latest member
strainu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top