Combobox not scrolling

Joined
Dec 20, 2007
Messages
2
Reaction score
0
I am using Excel 2003. I have a combobox on my userform called cbDescription. I am using a dynamic range called data. I have had it working fine but had to play with the code to get it to insert a new row in the spreadsheet when I added a new item. After totally messing it up I am just trying to populate my fields on the userform, which I haven't finised yet. But my question is why would the drop down not scroll in a combo box.

the code that populates the combobox would come from the following:

Private Sub UserForm_Initialize()
frmItemListing.cbDescription.SetFocus

ClearForm
Me.MultiPage1.Value = 0 ' go to page 1
CurrentYear
TabFocus

Dim Found As Long, i As Long
Dim cel As Range

'Set Range Name to suit
MyList = "Data"

Set DataList = Range(MyList)
ReDim FArray(DataList.Cells.Count)
i = -1

For Each cel In DataList
On Error Resume Next
Found = Application.WorksheetFunction.Match(CStr(cel), FArray, 0)
If Found > 0 Then GoTo Exists
i = i + 1
FArray(i) = cel
Exists:
Found = 0
Next
ReDim Preserve FArray(i)
Call BubbleSort(FArray)
cbDescription.ListRows = i + 1
cbDescription.List() = FArray
End Sub

Sub BubbleSort(MyArray As Variant)

Dim First As Integer
Dim Last As Integer
Dim i As Integer
Dim j As Integer
Dim Temp As String
Dim List As String

First = LBound(MyArray)
Last = UBound(MyArray)
For i = First To Last - 1
For j = i + 1 To Last
If MyArray(i) > MyArray(j) Then
Temp = MyArray(j)
MyArray(j) = MyArray(i)
MyArray(i) = Temp
End If
Next j
Next i
End Sub

Also, I am not new to Excel but I am new to Excel Programming.

Due date fast approaching on this project. Will answer any questions you have in order to get this done. :D

cward
 
Joined
Dec 20, 2007
Messages
2
Reaction score
0
I have searched all over the net and can't find any reference to a combobox with over 65 items not scrolling. Any info would be greatly appreciated.

Thx
cward
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top