Thread: ComboBox
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dianne Dianne is offline
external usenet poster
 
Posts: 107
Default ComboBox

Michelle,

Is your user form actually called "UserFormSection1"?

I also notice that you refer to 2 different comboboxes: ComboBoxWeather
and ComboBox1.

Check the names of your form and comboboxes to make sure your code is
referring to actual objects.

The other thing to check is that you're not positioning your combobox
off your form -- that Left=252 is not off the form entirely.

--
Dianne

In ,
Michelle Bryant typed:

Private Sub UserFormSection1_Initialize()

ComboBoxWeather.AddItem "Poor" 'index 0
ComboBoxWeather.AddItem "Fair" ' index 1
ComboBoxWeather.AddItem "Good" ' index 2

ComboBoxWeather.Style = fmStyleDropDownCombo
ComboBoxWeather.ListIndex = 0

ComboBoxWeather.Enabled = True
ComboBox1.Left = 252
ComboBox1.Top = 6
ComboBox1.Width = 168
ComboBox1.Height = 18


End Sub