View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
cliodne[_8_] cliodne[_8_] is offline
external usenet poster
 
Posts: 1
Default filling a simple combobox


I know this is an incredibly stupid question, but I've read my VBA book,
sites, and forum, and have not found the answer. All I'm trying to do
is create a simple dropdown box with five words that the user can
select from.

I tried this from what I've found, but it's not working:

Private Sub UserForm_Initialize()
'
'filling the combo box with values
'
With WeatherComboBox
..AddItem = "Sunny"
..AddItem = "Cloudy"
..AddItem = "Foggy"
..AddItem = "Rainy"
..AddItem = "Snowy"
End With
'
'selects the first list item
'
WeatherComboBox.ListIndex = 0
'
End Sub

---

thanks.


--
cliodne
------------------------------------------------------------------------
cliodne's Profile: http://www.excelforum.com/member.php...o&userid=28774
View this thread: http://www.excelforum.com/showthread...hreadid=490616