Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
excel dilema sam23 Excel Discussion (Misc queries) 3 July 12th 07 09:20 AM
IF Dilema detail Shu of AZ Excel Discussion (Misc queries) 6 December 26th 06 05:08 AM
IF Dilema Shu of AZ Excel Discussion (Misc queries) 10 December 24th 06 06:15 PM
sorting dilema Bobbie Excel Discussion (Misc queries) 3 January 5th 05 06:01 PM
Drop Down Box Dilema Ryan Excel Programming 2 May 20th 04 07:22 PM


All times are GMT +1. The time now is 11:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"