Setting Default Option Value

bluegirl_1962

New Member
Joined
Jun 7, 2011
Messages
10
New to VBA.. I need to set a default option button value. There are three options and there is already code under a userform_initiialize(). How do I get started? Any direction would be appreciated.
 
Customer.Value = True the very first line.. In the property box for the Name it is xxxxxx_option... caption is xxxxxxx
 
Upvote 0

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
The Variable Name in the code has to match the name in the property pane (Name) Field. Try this out

Code:
Private Sub UserForm_Activate()

With Customer_State_Selection
.State_Combo.Clear
.Country_Combo.Clear

.Customer_Option.Value = True
.State_Option.Value = False
.Country_Option.Value = False

.State_Combo.AddItem "Nothern"
.State_Combo.AddItem "Southern"
.State_Combo.AddItem "Western"


End With
End Sub
 
Upvote 0
I noticed that the word "Customer" has focus, but the radio button is not enabled. Do I need to make another statement?
 
Upvote 0
I can't reproduce the issue you are having. I might be missing something trying to reproduce the userform that I don't realize. So, I'm really not sure I can help anymore without access to the spreadsheet.
 
Upvote 0
Thanks... was able to determine why it wasn't working. Thought I posted a note giving thanks, because I would have never identified the issue without the assistance.. Much thanks
 
Upvote 0

Forum statistics

Threads
1,216,091
Messages
6,128,779
Members
449,468
Latest member
AGreen17

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