combobox fill problem

  • Thread starter Pierre via OfficeKB.com
  • Start date
P

Pierre via OfficeKB.com

Hi experts,
i have the following code to fill a combobox

Private Sub UserForm_Initialize()
With Sheets("hulpblad")
cbo_accountnr.RowSource = "b2:c500"
End With
End Sub

This works fine but the userform on which the combo is, is used on sheet 1
where the combobox should be filled with items on sheet("hulpblad")
In my code the With sheets("hulpblad") does not work when i call the userform
in sheet1.
I get the list"b2"c500" from sheet1 istead of the list from sheet("hulpblad")
Can anyone help me please ?
Thanks,
Pierre
 
G

Guest

Try:

Private Sub UserForm_Initialize()

cbo_accountnr.RowSource = "hulpblad!b2:c500"

End Sub
 

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