View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
merjet merjet is offline
external usenet poster
 
Posts: 812
Default preselecting in combo box

Modify the loop like this:

For Each c In ComboBox1.List
iCt = iCt + 1
If CInt(c) = Range("B11") Then
ComboBox1.ListIndex = iCt
Exit Sub
End If
Next c

Be careful about types. When I fill the List with numbers, they are
taken as Text.

Hth,
Merjet