Meat4grinder
Board Regular
- Joined
- May 20, 2012
- Messages
- 66
Trying to populated 2 combo box with multi columns the first one i am trying to just populated the combobox with client/company names. The second one i want to go thru doors and any that dont have a linked id (DoorInfoWS.Range("B" & a).Value = "") for that row to populated the combo box.
Also this there a code i can use in the first combobox (CBox_Client) that when i start typing a name or company it would bring up most likely match/ or sort for that letter combination?
Error - "Run-time error '381': Could not set the column property. Invalid property array index."
Also this there a code i can use in the first combobox (CBox_Client) that when i start typing a name or company it would bring up most likely match/ or sort for that letter combination?
Code:
Set DoorInfoWS = Sheets("Door info")Dim FinalRow As Integer
FinalRow = CompInfoWS.Cells(CompInfoWS.Rows.Count, "A").End(xlUp).Row
For i = 3 To FinalRow
With Me.CBox_Client
.AddItem i
.Column(0) = i 'Row location
.Column(1) = CompInfoWS.Range("A" & i).Value 'Company ID
.Column(2) = CompInfoWS.Range("B" & i).Value 'Company Name
.Column(3) = CompInfoWS.Range("C" & i).Value 'Contact or client name
.Column(4) = CompInfoWS.Range("D" & i).Value 'Address
End With
Next i
FinalRow = DoorInfoWS.Cells(DoorInfoWS.Rows.Count, "A").End(xlUp).Row
For a = 3 To FinalRow
If DoorInfoWS.Range("B" & a).Value = "" Then
With Me.Cbox_Door
.AddItem a
.Column(0) = a 'Row location
.Column(1) = DoorInfoWS.Range("A" & i).Value 'Door ID
.Column(2) = DoorInfoWS.Range("C" & i).Value 'Address of door
.Column(3) = DoorInfoWS.Range("D" & i).Value 'location at address
.Column(4) = DoorInfoWS.Range("E" & i).Value & " x " & DoorInfoWS.Range("F" & i).Value 'Size of door
End With
End If
Next a
End Sub
Error - "Run-time error '381': Could not set the column property. Invalid property array index."
Last edited: