View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
pallaver pallaver is offline
external usenet poster
 
Posts: 62
Default .AddItem list and populating combobox with created list

Couple of questions though for my further understanding:

1. I noticed you had put in "Me." in front of cboDirect, yet the
program works without the "Me." Why did you put the "Me." in? Does
it help with bugs or something?
2. What does this line accomplish: " .MatchEntry =
fmMatchEntryComplete "

Thanks, Neil

Option Explicit
Private Sub UserForm_Initialize()
* * Dim i As Long
* * Dim RowWorkMin As Long


* * RowWorkMin = 77


* * With Me.cboDirect
* * * * .RowSource = ""
* * * * .Style = fmStyleDropDownList
* * * * .MatchEntry = fmMatchEntryComplete
* * * * For i = RowWorkMin To 88
* * * * * * Me.cboDirect.AddItem i
* * * * Next i
* * End With


End Sub


If you want to allow the user to type an entry that isn't on the dropdown list,
you can change the .style to fmStyleDropDownCombo. *(I'm kind of confused about
what you wanted.)