Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions,microsoft.public.excel.worksheetfunctions
|
|||
|
|||
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
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions,microsoft.public.excel.worksheetfunctions
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How use info in Excel shared worksheets to create new worksheets | Excel Worksheet Functions | |||
How do i assign the ActiveWorkbook.Worksheets to a worksheets object? | Excel Worksheet Functions | |||
Assigning Cells in worksheets to other data in other worksheets. | Excel Discussion (Misc queries) | |||
Sort Numerically Worksheets via VB when creating a new worksheets | Excel Programming | |||
Need code to protect worksheets - amount of worksheets varies | Excel Programming |