dim myCell as range
dim myRng as range
set myrng = worksheets("sheet2").range("e2:h2")
With me.combobox3
for each mycell in myrng.cells
.additem mycell.value
next mycell
end with
> How do you write a source in code in VB Code for a ComboBox3 on an Excel
> UserForm where the source is horizontal range. For example Sheet2!E2:H2.
> --
> ca1358

Signature
Dave Peterson
ca1358 - 19 Jan 2006 22:25 GMT
Thank you!!!!!!!!!!!!

Signature
ca1358
> dim myCell as range
> dim myRng as range
[quoted text clipped - 12 lines]
> > --
> > ca1358
Hi,
If it's just the contents of the cells required to populate the control
and not be linked then perhaps,
ComboBox1.List = _
Application.WorksheetFunction.Transpose( _
Worksheets("sheet2").Range("e2:h2"))
Cheers
Andy
> How do you write a source in code in VB Code for a ComboBox3 on an Excel
> UserForm where the source is horizontal range. For example Sheet2!E2:H2.

Signature
Andy Pope, Microsoft MVP - Excel
http://www.andypope.info