Hello! First time poster, long time steal-all-your-code-r.
I have a combobox in a userform that's supposed to pull two values from two different box. One is the numeric value of a code, and the second is the text discription of that code. I want a single combo box that has the code and the value both included, which I accomplished via the following code:
Which fills the combo box nicely. Now the problem here is that unless I use the columnwidths property, I get something that looks like this:
in the combo box where VALU is the cut-off version of what VALUE should be.
When I attempt to use the ColumnWidths property, it seems like regardless what I put, I end up with only column 2 showing value.
Is my current iteration, but I've used several. Any help would be greatly appreciated!
Thanks,
James
I have a combobox in a userform that's supposed to pull two values from two different box. One is the numeric value of a code, and the second is the text discription of that code. I want a single combo box that has the code and the value both included, which I accomplished via the following code:
Code:
For Each cCount In RefData.Range("cboOCCcode")
With Me.cboOCCnc
.AddItem cCount.Value
.List(.ListCount - 1, 1) = cCount.Offset(0, 1).Value
End With
Next cCount
Which fills the combo box nicely. Now the problem here is that unless I use the columnwidths property, I get something that looks like this:
Code:
"CODE VALU"
in the combo box where VALU is the cut-off version of what VALUE should be.
When I attempt to use the ColumnWidths property, it seems like regardless what I put, I end up with only column 2 showing value.
Code:
Me.cboOCCnc.ColumnWidths = ("1;3")
Is my current iteration, but I've used several. Any help would be greatly appreciated!
Thanks,
James