View Single Post
  #1   Report Post  
Kiran
 
Posts: n/a
Default Combo Box List out of range error.

For I = 1 To 6
Dim Item As String
Item = "I" & CStr(I)

roomName = Worksheets("Sheet1").Range(Item).Value
Worksheets("Sheets1").cmbList.AddItem (roomName)
MsgBox (roomName)
Next

I dont know why this piece of code is throwsing the error. If the line
Worksheets("Sheets1").cmbList.AddItem (roomName) is commented out, then the
msg box shows all the 6 items there. Which tells me there is some problem
with this line of code(combo box). Is there a property that needs to be set
for combo box's?Please help... Thnx