Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
OptionButton selection dilema
Using XL 2000
I have 10 OptionButtons, assigned to 5 questions. The user can select either yes or no to each question. Example... If Q1; Yes was selected, I require a string to be placed into Worksheets("Lines").Cells(NewRow, "Z") = "Cr3" If Q1; No was selected, I require a string to be placed into Worksheets("Lines").Cells(NewRow, "Z") = "Cr6" and so on for Q2-Q5 all five Q's are mandatory so I figure bundling them into a button control would somehow check each for a repsonse, any ideas on this procedure would be bonus. Any suggestion appreciated. Many thanks Paul |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
OptionButton selection dilema
In a general module
Public NewRow as Long somewhere you set the value of New Row then in the module associated with the worksheet or userform: Private Sub OptionButton1_Click() if OptionButton1.Value then Worksheets("Lines").Cells(NewRow, "Z") = "Cr3" End if End Sub Private Sub OptionButton2_Click() if OptionButton2.Value then Worksheets("Lines").Cells(NewRow, "Z") = "Cr6" End if End Sub You should use the groupname property of the option buttons to put each pair in a separate group. Name chosen is immaterial; it should just be unique to the pair. -- Regards, Tom Ogilvy "Paul" wrote in message ... Using XL 2000 I have 10 OptionButtons, assigned to 5 questions. The user can select either yes or no to each question. Example... If Q1; Yes was selected, I require a string to be placed into Worksheets("Lines").Cells(NewRow, "Z") = "Cr3" If Q1; No was selected, I require a string to be placed into Worksheets("Lines").Cells(NewRow, "Z") = "Cr6" and so on for Q2-Q5 all five Q's are mandatory so I figure bundling them into a button control would somehow check each for a repsonse, any ideas on this procedure would be bonus. Any suggestion appreciated. Many thanks Paul |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
excel dilema | Excel Discussion (Misc queries) | |||
IF Dilema detail | Excel Discussion (Misc queries) | |||
IF Dilema | Excel Discussion (Misc queries) | |||
sorting dilema | Excel Discussion (Misc queries) | |||
Drop Down Box Dilema | Excel Programming |