excel vba - why vba combobox blank unless I type -


I created a UserForm ComboBox with a list of items, when ComboBox appears blank when I run UserForm As long as I do not try to type something, and only then one item appears in the combo box. Is there something that I'm doing wrong that does not show the text in my combo box until I type?

After adding items you can set ListIndex to believe your combo box "cb" Given, VBAProject-> Form- & gt; The code placed in the UserForm1 module will add 3 elements to the combo box and automatically the first combo box).

  Personal sub UserForm_Initialize () cb.AddItem "item1" cb.AddItem "item 2" cb.AddItem "item 3" cb.ListIndex = 0 and sub    

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -