Option Button for Macro

qwertysz

New Member
Joined
Jun 15, 2012
Messages
11
Hello,

the uses of Option Button would be perfect for my macro but...

How to put Option Buttons on a Box like InputBox or MsgBox?

I don't like to put them o a spreadsheet, is it possible?
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Look in the VBA screen and select the Insert Menu and UserForm you can then use the design tools to build up a form with these controls.
 
Upvote 0
Is the userform invisible?

I mean, it must appear only when I must choose one option but then disappear.. is it possible with the userform?
 
Upvote 0
Where do you want the option button? On a userform?
"it must appear only when I must choose one option but then disappear"

I'm not sure how you want the user interface to function.
 
Upvote 0
Hope I can let understand me...

I've got a macro that creates a new sheet. In that new sheet, in A1 I like to put a number of 20 digit (only 3 different types) but won't ask ever and ever the user to enter it with inputbox.

I remember about the option button, where I can put this numbers and let the user choose what he need.

How does I want the macro works:
- Start the Macro
- Creates sheet
- Let userform be visible
- Choose which number I need and confirm it with button on userform
- Let userform be invisible
- and Go on..

I don't know well userform so I don't know how it works...
 
Upvote 0
Look at the Option Group in the userfrom and change the caption to the numbers you want and add several then name each option something like optFirst or optSecond then you would add a command button and the code would go behind the command button using either an IF statement or a Select Case statement.
 
Upvote 0

Forum statistics

Threads
1,214,614
Messages
6,120,533
Members
448,969
Latest member
mirek8991

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