combobox on userform not populating ??

C

Corey

The below code posted by a fellow user to assist me is suppose to populate a
combobox with ONLY values in Column A in sheet named(InspectionData).

However i do NOT get any values in the combobox dropdownlist.

Do i need to add something to the RowSource ??



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Private Sub UserForm_Initialize()

Dim lastcell As Long
Dim myRow As Long

lastcell = Cells(Rows.Count, "A").End(xlUp).Row

With ActiveWorkbook.workSheets("InspectionData")
For myRow = 2 To lastcell
If .Cells(myRow, 1) <> "" Then
If IsNumeric(.Cells(myRow, 1)) = True Then
Me.ComboBox1.AddItem .Cells(myRow, 1)
End If
End If

Next myRow
End With

End Sub

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Corey....
 
C

Corey

John,
No i get NO error.
When i click on the list button, i simply GET Nothing listed.
The Sheet(InspectionData) at the moment is completely blank, EXCEPT for a
value of 499 in cell(A2).

So according to the code, i should get a 499 in the combobox1 list, should i
not ?

Corey....
 

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