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 | |||
Worksheets moved or deleted by unknown means! | Excel Discussion (Misc queries) | |||
Duplicate Worksheets | Excel Discussion (Misc queries) | |||
Changing a Link Mid-way Across Worksheets | Excel Worksheet Functions | |||
Merge Worksheets | Excel Worksheet Functions | |||
HELP! How do you--> Lock a set of rows but also link worksheets to | Excel Discussion (Misc queries) |