I have this code that I've used in the past to populate the combo box in a userform based on a previous combo box select.
I need to change the ws.range reference to look at columns of a table. (i.e. table[column2] etc.)
need some assistance on this one.
Code:
If custnamecb.Value = "" Then
'refresh and look up the customer name by the customer number provided.
Do
If ws.Range("B" & CStr(lngRow)).Value = Me.custnumbtb.Text Then
Me.custnamecb.AddItem ws.Range("C" & CStr(lngRow)).Value
ElseIf ws.Range("B" & CStr(lngRow)).Value = "" Then
Exit Do
End If
lngRow = lngRow + 1
Loop
Else
'don't do anything
Exit Sub
End If
I need to change the ws.range reference to look at columns of a table. (i.e. table[column2] etc.)
need some assistance on this one.