#1   Report Post  
Posted to microsoft.public.excel.misc
Mike Rogers
 
Posts: n/a
Default Option Buttons

I have a form that has option buttons for answering "Yes" "No" questions.
About 45 sets. Everything works really well but this form may also need to
be printed off and filled in by hand, (and then be entered later). Is there
anyway to have all option buttons read false, as apposed to having one read
true and the other read false for each set, so when it is printed everything
is blank. (Not selected) As it is when printed one or the other has been
selected and is therefore the dot is printed. Thanks for the help!!

Mike Rogers
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Option Buttons

First, I would think that since you're getting Yes/No response, it might be
better to use a single checkboxe for each answer--if it's checked, then it's
yes. If not checked, no.

But you could use a macro to turn off the optionbuttons on a worksheet.

Option Explicit
Sub testme()

Dim OptBTN As OptionButton
Dim OLEObj As OLEObject

For Each OptBTN In ActiveSheet.OptionButtons
OptBTN.Value = xlOff
Next OptBTN

For Each OLEObj In ActiveSheet.OLEObjects
If TypeOf OLEObj.Object Is msforms.OptionButton Then
OLEObj.Object.Value = False
End If
Next OLEObj

End Sub

The OptBTN stuff relates to optionbuttons from the Forms toolbar.

The OLEObj stuff relates to optionbuttons from the Control toolbox toolbar.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Mike Rogers wrote:

I have a form that has option buttons for answering "Yes" "No" questions.
About 45 sets. Everything works really well but this form may also need to
be printed off and filled in by hand, (and then be entered later). Is there
anyway to have all option buttons read false, as apposed to having one read
true and the other read false for each set, so when it is printed everything
is blank. (Not selected) As it is when printed one or the other has been
selected and is therefore the dot is printed. Thanks for the help!!

Mike Rogers


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
Mike Rogers
 
Posts: n/a
Default Option Buttons

Dave,

Thanks for the help. That was exactly what I needed, this form also has an
area for three choices (Dependant, Assistance, Independant) that is used for
evaluations. So your suggestion about Check boxes for the "Yes" "No" had
already been thought of. I really do appreciate your help here, as always!!

Mike

"Dave Peterson" wrote:

First, I would think that since you're getting Yes/No response, it might be
better to use a single checkboxe for each answer--if it's checked, then it's
yes. If not checked, no.

But you could use a macro to turn off the optionbuttons on a worksheet.

Option Explicit
Sub testme()

Dim OptBTN As OptionButton
Dim OLEObj As OLEObject

For Each OptBTN In ActiveSheet.OptionButtons
OptBTN.Value = xlOff
Next OptBTN

For Each OLEObj In ActiveSheet.OLEObjects
If TypeOf OLEObj.Object Is msforms.OptionButton Then
OLEObj.Object.Value = False
End If
Next OLEObj

End Sub

The OptBTN stuff relates to optionbuttons from the Forms toolbar.

The OLEObj stuff relates to optionbuttons from the Control toolbox toolbar.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Mike Rogers wrote:

I have a form that has option buttons for answering "Yes" "No" questions.
About 45 sets. Everything works really well but this form may also need to
be printed off and filled in by hand, (and then be entered later). Is there
anyway to have all option buttons read false, as apposed to having one read
true and the other read false for each set, so when it is printed everything
is blank. (Not selected) As it is when printed one or the other has been
selected and is therefore the dot is printed. Thanks for the help!!

Mike Rogers


--

Dave Peterson

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
Can the captions for Option Buttons be drawn from other cells ? hedonist68 Excel Discussion (Misc queries) 3 September 8th 05 02:25 PM
Deleting option buttons jzemanek Excel Discussion (Misc queries) 2 August 20th 05 12:04 AM
Using 'Option Buttons' Julian Excel Discussion (Misc queries) 3 August 17th 05 07:36 PM
Option Buttons in Group Box JAMES T. Excel Discussion (Misc queries) 4 March 22nd 05 08:59 PM
Can I use more than one set of option buttons in a worksheet? Ray Excel Worksheet Functions 2 November 22nd 04 03:37 PM


All times are GMT +1. The time now is 10:32 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"