PDA

View Full Version : Solved: Not to highlight when selected



av8tordude
01-09-2011, 03:02 PM
I have combo box in a userform with the preference set as "Dropdown List". The list consist of "Select One", "Option 1", "Option 2". The "Select One" is automatically display when the userform appears. when I click the combo box, the list is display in the drop down view and "Select One" is highlighted in the combo box.

Is it possible to display the list without "Select One" being hightlighted in the combo box?

Artik
01-09-2011, 03:18 PM
You probably wrote something like this:Private Sub UserForm_Initialize()
With Me.ComboBox1
.AddItem "Select One"
.AddItem "Option 1"
.AddItem "Option 2"

.ListIndex = 0
End With
End Sub

And try this:Private Sub UserForm_Initialize1()
With Me.ComboBox1
.AddItem "Option 1"
.AddItem "Option 2"
.Value = "Select One"
End With
End Sub

Artik

av8tordude
01-09-2011, 03:31 PM
Actually I have it like this...

Me.cboDec.List = Array("Select One", "Option 1", "Option 2")

my apologies for not given an example in my first post.

Artik
01-09-2011, 04:12 PM
See example in attachment.

Artik

av8tordude
01-09-2011, 04:32 PM
ok that works...thank you:friends: