• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

disabling other option buttons

prakash

New Member
Sir, Good evening.

I am designing a survey questionnaire thro' Excel 2007, in which option buttons are used for selecting an option from list of options (ActiveX controls in excel 2007). I want particular option buttons to be disabled for selection, if one particular option button is selected. Any one pls help on this.


Regards

Prakash
 
Hi Prakash,


I have given some example with help of that i guess you can create your requirements.


2 codes one for disable and other one for enable


Private Sub OptionButton1_Click()

OptionButton2.Value = False

OptionButton2.Enabled = False

End Sub


Private Sub Worksheet_Activate()

OptionButton2.Value = False

OptionButton2.Enabled = True

OptionButton1.Value = False

OptionButton1.Enabled = True

End Sub


Both code should in worksheet. please try.


Thanks,

SK
 
Dear Mr.Suresh.

Thanks for ur propmt and quick reply. I need some more clarification on this. I want u to view my sample file and I need the following clarifications:

1) I am unable to select more than 1 option button in the entire sheet (I want to select 1 option button in one group(i.e in one option in 1 question).

2) If I select yes in the first question, then the other questions should be enabled for selection. Else other questions should remain disabled.


Pls suggest me on this.


thanks

Prakash
 
Good day prakash


SK may be able to help if you actualy upload your sample file.


http://chandoo.org/forums/topic/posting-a-sample-workbook


Dropbox is the best to use
 
Sir,

Those websites are blocked in my server. Kindly suggest me an email, so that I can send my file to ur good-self pls.


Prakash S
 
Hi Prakash,


did you tried..

* Right Click on Object (Option button 1)

* Properties..

* group Name

* Assign same Group Name for all option button you want to GROUPED..


Details is mentioned in the attached also.. :)


https://dl.dropbox.com/u/78831150/Excel/Option%20button%20%28prakash%29.xls


Regards,

Deb
 
Mr.Deb, thanks a lot.

My clarification is; how to disable the option buttons of question2 and question3 in the case, if option NO is selected in question1.


Prakash
 
Hi Prakash ,


See the file here :


https://www.dropbox.com/s/k90vmnyt35mr0z2/Copy%20of%20Option%20button%20%28prakash%29.xls


Narayan
 
Sir,

I need one more small clarification.

Can I assume an text value in cells based on the selection made in the above case.

Example: Selecting Option1 in the second question should display "Option1 selected" in a cell A1 and vice versa.

Pls help on this.


Prakash S
 
Hi Prakash ,


Is this what you wanted ?


https://www.dropbox.com/s/k90vmnyt35mr0z2/Copy%20of%20Option%20button%20%28prakash%29.xls


Narayan
 
Dear Mr.Narayan.

Thanks for ur instant supports.

I am willing to use form control option buttons for similar case.

Looking for ur support in this regard. I have mailed the document to U, with details.


Prakash S
 
Back
Top