#1   Report Post  
Posted to microsoft.public.excel.misc
Cordobes
 
Posts: n/a
Default Userform data

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.
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Userform data

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


--

HTH

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


"Cordobes" wrote in message
...
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.



  #3   Report Post  
Posted to microsoft.public.excel.misc
Cordobes
 
Posts: n/a
Default Userform data

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.

"Bob Phillips" wrote:

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


--

HTH

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


"Cordobes" wrote in message
...
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.




  #4   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Userform data

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)


"Cordobes" wrote in message
...
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.

"Bob Phillips" wrote:

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


--

HTH

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


"Cordobes" wrote in message
...
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.






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003, Convert EXISTING Worksheet Data to XML? [email protected] Excel Discussion (Misc queries) 4 November 16th 05 04:45 AM
UserForm Data to Spreadsheet Andy Tallent Excel Discussion (Misc queries) 2 June 22nd 05 04:51 PM
Line Graph Data Recognition Nat Charts and Charting in Excel 2 April 30th 05 02:07 PM
Data Validation Cell - Move to UserForm thom hoyle Excel Worksheet Functions 0 April 28th 05 12:23 AM
Running Data Table using an input that triggers DDE linked data [email protected] Excel Discussion (Misc queries) 1 December 16th 04 11:56 AM


All times are GMT +1. The time now is 08:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"