Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Mcasteel
 
Posts: n/a
Default VBA: Disable Frame and Radio Buttons based on Another Radio Button Being True


Im not sure how to disable a set of radio buttons (within a frame) based
upon the answer of a previous radio button (value true).

Basically we are looking at

_Question_1:_
Yes (radio button, opt1Yes)
No (radio button, opt2No)

_Question_2:_(If_question_1_is_yes,_I_dont_want_th e_option_of_answering_question_2)_
Located in frame 2.
option1Yes
option2No


*So....???
If opt1Yes = true then opt2.disable? or frame2.disable?*


--
Mcasteel
------------------------------------------------------------------------
Mcasteel's Profile: http://www.excelforum.com/member.php...o&userid=15698
View this thread: http://www.excelforum.com/showthread...hreadid=273606

  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Why do you want to do this? When you have a group of radio buttons, as in a
frame, only one can be selected. The problem with disabling the second is
that the user cannot then change their mind, their would only be one button
left.

--

HTH

RP

"Mcasteel" wrote in message
...

Im not sure how to disable a set of radio buttons (within a frame) based
upon the answer of a previous radio button (value true).

Basically we are looking at

_Question_1:_
Yes (radio button, opt1Yes)
No (radio button, opt2No)


_Question_2:_(If_question_1_is_yes,_I_dont_want_th e_option_of_answering_ques
tion_2)_
Located in frame 2.
option1Yes
option2No


*So....???
If opt1Yes = true then opt2.disable? or frame2.disable?*


--
Mcasteel
------------------------------------------------------------------------
Mcasteel's Profile:

http://www.excelforum.com/member.php...o&userid=15698
View this thread: http://www.excelforum.com/showthread...hreadid=273606



  #3   Report Post  
crispbd
 
Posts: n/a
Default


This post is better suited for the VBA Programming forum, but here is
what you are looking for hopefully:

Step 1) Open the VBA editor, double click the sheet your controls are
on
Step 2) View Menu - Code
Step 3) Left Dropdown select Question1's No code, then Yes code

Get something like this: (if No for question 1 is selected, they CAN
answer Q2)
-
Private Sub optQ1No_Click()-
OPTQ2YES.ENABLED = TRUE
OPTQ2NO.ENABLED = TRUE
-End Sub-

(if YES for question 1 is selected, they CANNOT answer Q2)

-Private Sub optQ1Yes_Click()-
OPTQ2YES.ENABLED = FALSE
OPTQ2NO.ENABLED = FALSE
-End Sub-


--
crispbd
------------------------------------------------------------------------
crispbd's Profile: http://www.excelforum.com/member.php...o&userid=10880
View this thread: http://www.excelforum.com/showthread...hreadid=273606

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



All times are GMT +1. The time now is 04:13 PM.

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"