View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Simon Lloyd[_848_] Simon Lloyd[_848_] is offline
external usenet poster
 
Posts: 1
Default Problem setting combobox


Hi try this modified code, it worked for me for Combobox1 i'm using
Excel 2003 Windows XP.

Regards,
Simon

Sub FillAllComboBoxes()
Dim cboBox As MsForms.ComboBox
With settingsform
..ComboBox1.AddItem "FirstItem"
Set cboBox = .ComboBox1
Call FillcomboBox(cboBox)
End With
End Sub


Sub FillcomboBox(cboBox As MsForms.ComboBox)

cboBox.AddItem "value1"
cboBox.AddItem "value2"

End Sub


--
Simon Lloyd
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...fo&userid=6708
View this thread: http://www.excelforum.com/showthread...hreadid=569126