![]() |
#5
|
||||
|
||||
![]()
At its simplest you would just add items to the combobox e.g.
Code:
Private Sub UserForm_Initialize() With ComboBox1 .AddItem "Select an Item" .AddItem "This is the first item" .AddItem "This is the second item" .AddItem "This is the third item" .ListIndex = 0 End With End Sub Code:
Private Sub UserForm_Initialize() Dim vList As Variant vList = Array("Select an Item", "This is the first item", "This is the second item", "This is the third item") With ComboBox1 .List = vList .ListIndex = 0 End With End Sub Code:
Private Sub UserForm_Initialize() Dim vList(3) As Variant vList(0) = "Select an Item" vList(1) = "This is the first item" vList(2) = "This is the second item" vList(3) = "This is the third item" With ComboBox1 .List = vList .ListIndex = 0 End With End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
Tags |
combo box, user forms |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Letter Template /w combo box list | etruz | Word | 4 | 10-31-2018 05:16 AM |
Copy excel userform data to a word template | Farnkf1970 | Excel Programming | 1 | 10-31-2017 01:35 AM |
Pasting a table with combo boxes to a new document looses the combo box | bobsut@enviro-consult.com | Word | 1 | 01-03-2017 01:29 PM |
userform to enter multiple lines of data in template | callasabra | Word VBA | 0 | 06-27-2014 05:29 PM |
Forms - Combo Box Linking data | tomkat | Word | 1 | 04-23-2010 06:28 AM |