Hi,
I have 3 radio buttons and a checkbox.
The checkbox should only be used when the 1st radio button is selected.
Is it possible to grey out the check box when the 2nd and 3rd radio buttons are selected.
Thank you
Hi,
I have 3 radio buttons and a checkbox.
The checkbox should only be used when the 1st radio button is selected.
Is it possible to grey out the check box when the 2nd and 3rd radio buttons are selected.
Thank you
You sure can.
Right click the radio button 1, choose View Code
Enter the following code for OptionButton1
And for buttons 2 and 3:![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
See attached if you have questions.
Attachment 261138
im getting an error.
when i click debug the following is highlighted: If OptionButton2.Enabled = True Then
My bad! I was cutting corners; let me lay out the code for each button separately:
One:
Two:![]()
Please Login or Register to view this content.
Three:![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
the 2nd and 3rd option buttons work great - the checkbox disappears when they're selected.
however, when the 1st option button is selected, I get the same error as before (Run-time error '424' Object required)
and the following highlighted in yellow: If OptionButton1.Enabled = True Then
Can you confirm that button one is indeed called OptionButton1?
Click on the object while in design mode and check the label in the upper left corner.
Attachment 261141
its actually optionbutton7 but everything is as it should be.
ive edited all the numbers in the macro to suit my button numbers.
As i said, buttons 2 and 3 are working perfectly. cant see why the 1st one isn't
If OptionButton7.Enabled = True Thenhowever, when the 1st option button is selected, I get the same error as before (Run-time error '424' Object required)
and the following highlighted in yellow: If OptionButton1.Enabled = True Then
Does that fix it? Without seeing your full code or a screenshot, my hands are a little tied.
thats what im inputing.
my code is:
all the numbers are correct![]()
Please Login or Register to view this content.
And the error is getting stuck on OptionButton1?
If you are unable to post a copy of your workbook, I would see additional help resolving the RunTime error on the VBA Forum.
You will likely find more skilled coders there.
here you go
Last edited by tlacloche; 08-27-2013 at 06:59 PM.
I see.
You used Form Controls and I used Active X Controls.
Two different types of buttons.
I am not sure how to apply the macros to your versions of the buttons, I will think upon it.
On Active X buttons, you simply right click them and choose View Code.
If you convert your buttons to Active X, the LinkedCell is listed under the Properties menu for them.
im using a mac. does that help?
apparently activex cannot be used on excel mac
Last edited by tlacloche; 08-27-2013 at 07:04 PM.
According to your workbook, the buttons are 8, 10, and 12.
There is no 7.
it was 7.
i then messed up the "7 button" after trying the codes and so deleted it and added a new one
When you delete and add it back, it keeps counting.
@daffodil - the new button is a different number, so it won't keep counting.
Maybe I should add to the title "without using activex code".
Can anyone help?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks