Radio Buttons without Macros

spret93

New Member
Joined
Jan 2, 2017
Messages
6
Hello. I am building a form/calculator in Excel ('13). I have inserted 3 option/radio buttons for the user to select between. By default, Excel has configured the output of these 3 buttons to a defined cell, when checked, to be 1, 2, and 3 respectively (which is exactly how I want to use them. I am referencing the output cell to make another decision).

The problem is, whenever I select one of the 3 buttons, I get a warning saying "Cannot run the macro....". Everything is functioning properly, and I do not believe the buttons are using any macros for this. But I still get the annoying warning window popping up every time. I tried disabling/enabling macros in my Excel Options.

Would appreciate any help.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
When you say:
" am building a form" do you mean a UserForm ?

I know of no type Option Button that is:

Your quote:
"By default, Excel has configured the output of these 3 buttons to a defined cell"

What do you want to happen when you click these option buttons?

I suspect you did not build this Workbook or you would know if these buttons had Macros assigned.
 
Upvote 0
Thanks for the reply. Yes, I created the workbook. No, not UserForm. In the button properties menu, you can define a cell for the output of the button. I inserted 3 buttons in a column, all with C9 as the output. When the top button is checked, C9 reads 1. Middle button = 2, and bottom button = 3. This is exactly what I want. However, I'm getting the warning/window popping up whenever I select a different button.
 
Upvote 0
Is this a Form Control option button or a activex option button

And tell me how your having the button put a value in the linked cell?

You said the default value is "when checked, to be 1, 2, and 3"
 
Upvote 0
It is a Form Control option button.

I right click on the button, go into Format Control, and select type in "C9" for the Cell link. I did this for 3 buttons (with C9 as the cell link for all three). Then, depending on which button is clicked, C9 changes to 1, 2 or 3 respectively.
 
Upvote 0
OK.

I see what your doing now.

You said:

When the top button is checked, C9 reads 1. Middle button = 2, and bottom button = 3. This is exactly what I want. However, I'm getting the warning/window popping up whenever I select a different button.

What type button is this "different button"

And what do you want to happen when you click on these other buttons
 
Last edited:
Upvote 0
Sorry if I'm not wording this all very clearly. By "selecting a different button", I just meant selecting one of my 3 radio buttons.
What is currently happening:
a) When I click one of 3 radio buttons, C9 changes to 1, 2 or 3 respectively
b) Warning window pops up "Cannot run macro..."
What I want to be happening:
- Just a (above) and not b!
 
Upvote 0
Thanks for the reply. Yes, I created the workbook. No, not UserForm. In the button properties menu, you can define a cell for the output of the button. I inserted 3 buttons in a column, all with C9 as the output. When the top button is checked, C9 reads 1. Middle button = 2, and bottom button = 3. This is exactly what I want. However, I'm getting the warning/window popping up whenever I select a different button.

Presuming the dialog warning reads akin to, "Cannot run the macro 'Book2!OptionButton1_Click'. The macro may not be available in this workbook or all macros may be disabled.", this means you assigned a macro that doesn't actually exist. If my guess sounds correct, then try:

Right-click the option button, select 'Assign macro'. In the 'Assign Macro' dialog box, the 'Macro name:' edit box will have the name of the non-existent macro. Delete the macro name and click the 'OK' <ok> button.

Does that do the trick?

Mark</ok>
 
Last edited:
Upvote 0
I want you to right click on the button while in developer mode
And choose "Assign Macro" then click edit and tell me what you see.
I suspect you will see some code which is causing the problem.
 
Upvote 0
Presuming the dialog warning reads akin to, "Cannot run the macro 'Book2!OptionButton1_Click'. The macro may not be available in this workbook or all macros may be disabled.", this means you assigned a macro that doesn't actually exist. If my guess sounds correct, then try:

Right-click the option button, select 'Assign macro'. In the 'Assign Macro' dialog box, the 'Macro name:' edit box will have the name of the non-existent macro. Delete the macro name and click the 'OK' <ok> button.

Does that do the trick?

Mark</ok>


THIS did the trick!! Thanks so much, guys. I just needed to remove the macro name it was looking for.
 
Upvote 0

Forum statistics

Threads
1,213,557
Messages
6,114,293
Members
448,564
Latest member
ED38

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top