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?
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(quot;A1quot;).Value
End Sub
Sub test2()
Dim ShNumber
ShNumber = 1
MsgBox Sheets(quot;Sheetquot; amp; ShNumber).Range(quot;A1quot;).Value
End Sub
--
Regards Ron de Bruin
www.rondebruin.nlquot;Paul W Smithquot; gt; wrote in message ...
gt;I am looking to populate a list box on a userform.
gt;
gt; I have set it's Row Source to a specific range on a worksheet.
gt;
gt; I am trying to make the Row Source Range Dynamic based on two parameters.
gt;
gt; I have nine identically formatted workbooks. The first Parameter and I managed this part, refers to a location (by me using
gt; offsets). The second parameter and is a number needs to refer to which of the nine worksheets to use.
gt;
gt; Can anyone offer any ideas?
gt;
- Oct 22 Sun 2006 20:09
Worksheets
close
全站熱搜
留言列表
發表留言