#1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions,microsoft.public.excel.worksheetfunctions
external usenet poster
 
Posts: 27
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
external usenet poster
 
Posts: 11,123
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
How use info in Excel shared worksheets to create new worksheets dkc Excel Worksheet Functions 0 June 28th 07 08:36 PM
How do i assign the ActiveWorkbook.Worksheets to a worksheets object? TS Excel Worksheet Functions 2 December 27th 06 02:49 PM
Assigning Cells in worksheets to other data in other worksheets. David McRitchie Excel Discussion (Misc queries) 0 November 27th 04 06:15 PM
Sort Numerically Worksheets via VB when creating a new worksheets John Excel Programming 6 June 1st 04 07:21 AM
Need code to protect worksheets - amount of worksheets varies Sandy[_3_] Excel Programming 1 September 9th 03 02:17 AM


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