VBA Form Combo Box question.

  • Thread starter Thread starter WTG
  • Start date Start date
W

WTG

Help !!!

I know this is most likely a simple question, but I'm stuck :(

I not to populate a Combo box in an Excel spread sheet I just enter
the location in the ListFillRange (EmpData!A1:A100).

But I got creative and tryed making a Userform with VBA.
Now I'm lost :(

In VBA the combo box doesn't have a ListFillRange....

One place I read to enter the location in the ControlSource field, but
it doesn't take the information. It keeps giving me an error message.

Can anyone Help Please?

Thanks

Wally
 
See response in worksheetfunctions.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
But it has a .rowsource property that you can use.

In fact, you can use it in code, too:

Option Explicit
Private Sub UserForm_Initialize()
Me.ComboBox1.RowSource _
= Worksheets("sheet1").Range("a1:a10").Address(external:=True)
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

Similar Threads


Back
Top