Can Listfillrange be used with a listbox or combobox on a form?

S

Simon Skelton

I have created a form with listboxes and comboboxes for use with a workbook
with 4 sheets - the last of which contains a series of lists which I would
like to use in conjunction with the form.

I am trying to add the lists to the relevant listbox and combobox using
listfillrange - but without success.

I am starting to think that listfillrange cannot be used in conjunction with
forms and only works with boxes embedded in spreadsheets - but I am not
convinced that could be correct.

Can anyone provide guidance on the correct vba syntax for using
listfillrange with a combobox in a form.

The box name is cmbName and the named range in worksheet "Lists" is
"Employees"
 
H

Harald Staff

For some unknown reason the properties on this is named differently on
forms. It's Rowsource:

Private Sub UserForm_Initialize()
Me.cmbName.RowSource = "=Employees!A1:A12"
End Sub

HTH. Best wishes Harald
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top