#1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions,microsoft.public.excel.worksheetfunctions
Paul W Smith
 
Posts: n/a
Default Worksheets

I am looking to populate a list box on a userform.

I have set it's Row Source to a specific range on a worksheet.

I am trying to make the Row Source Range Dynamic based on two parameters.

I have nine identically formatted workbooks. The first Parameter and I
managed this part, refers to a location (by me using offsets). The second
parameter and is a number needs to refer to which of the nine worksheets to
use.

Can anyone offer any ideas?


  #2   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions,microsoft.public.excel.worksheetfunctions
Ron de Bruin
 
Posts: n/a
Default Worksheets

Hi

You can use the sheetindex or if your sheet names are
Sheet1,Sheet2..... the second example

Sub test()
Dim ShNumber
ShNumber = 1
MsgBox Sheets(ShNumber).Range("A1").Value
End Sub

Sub test2()
Dim ShNumber
ShNumber = 1
MsgBox Sheets("Sheet" & ShNumber).Range("A1").Value
End Sub



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Paul W Smith" wrote in message ...
I am looking to populate a list box on a userform.

I have set it's Row Source to a specific range on a worksheet.

I am trying to make the Row Source Range Dynamic based on two parameters.

I have nine identically formatted workbooks. The first Parameter and I managed this part, refers to a location (by me using
offsets). The second parameter and is a number needs to refer to which of the nine worksheets to use.

Can anyone offer any ideas?



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
Worksheets moved or deleted by unknown means! Dan Excel Discussion (Misc queries) 1 December 5th 05 09:52 PM
Duplicate Worksheets mlofton Excel Discussion (Misc queries) 1 September 7th 05 02:58 PM
Changing a Link Mid-way Across Worksheets Frosty Excel Worksheet Functions 0 August 25th 05 12:03 AM
Merge Worksheets Mark Jackson Excel Worksheet Functions 0 June 8th 05 10:42 PM
HELP! How do you--> Lock a set of rows but also link worksheets to FRUSTRATED Excel Discussion (Misc queries) 6 December 29th 04 10:05 PM


All times are GMT +1. The time now is 09:54 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"