Hi,
Can you not make use of the boundcolumn?
Private Sub UserForm_Initialize()
Dim BuMs(), y
y = 3
ReDim BuMs(y, 1)
BuMs(1, 0) = "Fred"
BuMs(1, 1) = 1
BuMs(2, 0) = "John"
BuMs(2, 1) = 3
BuMs(3, 0) = "Mike"
BuMs(3, 1) = 5
cmbBuMs.List = BuMs
cmbBuMs.BoundColumn = 2
End Sub
Private Sub cmbBuMs_Change()
MsgBox cmbBuMs.Text & vbLf & cmbBuMs.Value
End Sub
Cheers
Andy
--
Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Graham Y" <(E-Mail Removed)> wrote in message
news:0EEEE57D-25F1-4F2B-AE2F-(E-Mail Removed)...
> Thanks Bob
> Was hoping I might have missed something.
> I'll just have to use the index to look the value up from the array.
>
> "Bob Phillips" wrote:
>
>> I think you will be unlucky with that one.
>>
>> --
>> HTH
>>
>> Bob
>>
>> (there's no email, no snail mail, but somewhere should be gmail in my
>> addy)
>>
>> "Graham Y" <(E-Mail Removed)> wrote in message
>> news:A57D0DEF-FAE3-468B-BA5A-(E-Mail Removed)...
>> >I use the following code to populate a combobox (on a userform) with a
>> >list
>> > of names and associated numbers (colour codes)
>> > Dim BuMs()
>> > ReDim BuMs(y, 1)
>> > BuMs(1,0)="Fred"
>> > BuMs(1,1)=1
>> > cmbBuMs.List = BuMs
>> > The combobox displays the names, but when I process the form, I also
>> > want
>> > to
>> > use the colur code, how do I access it?
>>
>>
>>