View Single Post
  #1   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

Good afternoon -

Beginner macro user here having some serious trouble with creating
userforms.
Essentially I would to create a combobox which has a list from number
X to number Y.
In the case below, X is RowWorkMin (which is defined earlier without a
problem), and Y is set at 88.

The code below does not seem to be working.

Where am I going wrong? I have scoured the internet for hours for a
simple solution yet haven't found one, hence posting here. RowWorkMin
may change, but essentially it will be a list of integers in sequence,
i.e. ....13,14,15,16,.... etc.

The next step then which I will probably also need help with is how to
populate the combobox on my userform with this list.

Lastly, I've been reading that the combobox allows you to type in an
entry not present in the list. What if I'd like the option of having
the number I'd like to select typed in instead of selected by the drop
down menu of the combobox? Does this mean that I should make a text
box entry as well to accomodate for this selection/entry style?



Private Sub UserForm_Initialize()
Dim i As Integer

For i = RowWorkMin To 88
cboDirect.AddItem Str(i)
Next i

End Sub


Hopefully this makes sense. Thanks for any help in advance :) -
neil