your code will take the range from the activeworkbook.
better to do like:
Private Sub UserForm_Initialize()
With ThisWorkbook.Sheets(3).Columns("EF")
Me.ComboBox1.RowSource = Range( _
.Cells(2), _
.Cells(Rows.Count).End(xlUp) _
).Address(external:=True)
End With
End Sub
--
keepITcool
|
www.XLsupport.com | keepITcool chello nl | amsterdam
davidm wrote :
I have created an Addin that contains a ListBox populated by a
rowsource reference.
The Excel file component of the addin works fine but somehow the
Listbox fails to load up in its Addin enviroment. The relevant part
of the code reads:
ListBox1.RowSource="ef2:em" & [em65536].End(xlUp).Row
I vaguely sense this may be a classical case where
Address(External:-True) may be required but I have lost my way a bit.
Thanks for any help.
David