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.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
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 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,224,602
Messages
6,179,843
Members
452,948
Latest member
UsmanAli786

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