Nicolaf
09-06-2011, 03:49 AM
Hi,
I have created a ComboBox in a Userform using code below:
Private Sub UserForm_Initialize()
With ComboBox1
.AddItem "France"
.AddItem "Italy"
.AddItem "Spain"
.AddItem "Guatemala"
End With
End Sub
Instead of adding each item (ie. country names) can I put in code the reference to a country list in Excel? This way I would not have to add each single item but simply reference cells.
So if my country names were found in Sheet1 from A1 to A4 how would my code look?
Thanks!
:confused:
I have created a ComboBox in a Userform using code below:
Private Sub UserForm_Initialize()
With ComboBox1
.AddItem "France"
.AddItem "Italy"
.AddItem "Spain"
.AddItem "Guatemala"
End With
End Sub
Instead of adding each item (ie. country names) can I put in code the reference to a country list in Excel? This way I would not have to add each single item but simply reference cells.
So if my country names were found in Sheet1 from A1 to A4 how would my code look?
Thanks!
:confused: