ComboBox RowSource Question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

For a given form can I reference multiple sheets within a workbook? Here is
what I tried to do but it failed on the second ComboBox.

....
ComboBox1.RowSource = Sheets("Sheet1").Range(Cells(1,1),Cells(10,3).Address
.....
.....

ComboBox2.RowSource = Sheets("Sheet2").Range(Cells(1,1),Cells(10,3).Address


Thanks
Mike
 
Hi Mike

I miss one )

And Cells use the cells on the activesheet now so you must use it like this

Sheets("Sheet2").Range(Sheets("Sheet2").Cells(1, 1), Sheets("Sheet2").Cells(10, 3)).Address
 
Ron,

I not sure I fully understand but I think what your'e telling me is that the
range refence refers to the active sheet only. I haven't tried this yet but
what if I switch active sheets between combox setups. Would that then allow
me to have multiple combo boxs ref. multiple sheet concurently?
 
You must always refer to the correct sheet with Cells
You can run the code thern with any sheet active

With Sheets("Sheet2")
ComboBox2.RowSource = .Range(.Cells(1, 1), .Cells(10, 3)).Address
End With
 

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