Consulting

Results 1 to 5 of 5

Thread: Solved: Not to highlight when selected

  1. #1

    Solved: Not to highlight when selected

    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?

  2. #2
    VBAX Mentor
    Joined
    Dec 2008
    Posts
    404
    Location
    You probably wrote something like this:[VBA]Private Sub UserForm_Initialize()
    With Me.ComboBox1
    .AddItem "Select One"
    .AddItem "Option 1"
    .AddItem "Option 2"

    .ListIndex = 0
    End With
    End Sub[/VBA]

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

    Artik

  3. #3
    Actually I have it like this...

    [VBA] Me.cboDec.List = Array("Select One", "Option 1", "Option 2")[/VBA]

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

  4. #4
    VBAX Mentor
    Joined
    Dec 2008
    Posts
    404
    Location
    See example in attachment.

    Artik
    Attached Files Attached Files

  5. #5
    ok that works...thank you

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •