Userform data

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

Guest

I have three userforms, each of them getting their data from three different
worksheets. Most of the work I do is in a fourth worksheet where the three
userforms should pop up. To load each of these userforms, I used :

UserForm1.ListBox1.RowSource = "b7:b" & items_quantity

Obviously, this works as long as the active worksheet is that where the data
is located.

Is there any way of collecting this data referencing the worksheet where it
is located ( ie UserForm1.ListBox1.RowSource = sheet1.range("b7:b" &
items_quantity)). I tried that but it doesn't work.

Thanks for your help.
 
UserForm1.ListBox1.RowSource = Worksheets("Sheet1").Range("B7:B" &
items_quantity).Address(,,,True)


--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Bob,

Thank you very much for the quick response. I trie what you suggested and it
is giving me this message <Subscript out of range>.
 
You have to use the worksheet name that you actually have, Sheet1 was just
an example.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

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

Back
Top