Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
ComboBox RowSource Question
For a given form can I reference multiple sheets within a workbook? Here is
what I tried to do but it failed on the second ComboBox. .... ComboBox1.RowSource = Sheets("Sheet1").Range(Cells(1,1),Cells(10,3).Addr ess ..... ..... ComboBox2.RowSource = Sheets("Sheet2").Range(Cells(1,1),Cells(10,3).Addr ess Thanks Mike |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
ComboBox RowSource Question
Hi Mike
I miss one ) And Cells use the cells on the activesheet now so you must use it like this Sheets("Sheet2").Range(Sheets("Sheet2").Cells(1, 1), Sheets("Sheet2").Cells(10, 3)).Address -- Regards Ron de Bruin http://www.rondebruin.nl "Mike Samyn" wrote in message ... For a given form can I reference multiple sheets within a workbook? Here is what I tried to do but it failed on the second ComboBox. ... ComboBox1.RowSource = Sheets("Sheet1").Range(Cells(1,1),Cells(10,3).Addr ess .... .... ComboBox2.RowSource = Sheets("Sheet2").Range(Cells(1,1),Cells(10,3).Addr ess Thanks Mike |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
ComboBox RowSource Question
Ron,
I not sure I fully understand but I think what your'e telling me is that the range refence refers to the active sheet only. I haven't tried this yet but what if I switch active sheets between combox setups. Would that then allow me to have multiple combo boxs ref. multiple sheet concurently? -- Mike "Ron de Bruin" wrote: Hi Mike I miss one ) And Cells use the cells on the activesheet now so you must use it like this Sheets("Sheet2").Range(Sheets("Sheet2").Cells(1, 1), Sheets("Sheet2").Cells(10, 3)).Address -- Regards Ron de Bruin http://www.rondebruin.nl "Mike Samyn" wrote in message ... For a given form can I reference multiple sheets within a workbook? Here is what I tried to do but it failed on the second ComboBox. ... ComboBox1.RowSource = Sheets("Sheet1").Range(Cells(1,1),Cells(10,3).Addr ess .... .... ComboBox2.RowSource = Sheets("Sheet2").Range(Cells(1,1),Cells(10,3).Addr ess Thanks Mike |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
ComboBox RowSource Question
You must always refer to the correct sheet with Cells
You can run the code thern with any sheet active With Sheets("Sheet2") ComboBox2.RowSource = .Range(.Cells(1, 1), .Cells(10, 3)).Address End With -- Regards Ron de Bruin http://www.rondebruin.nl "Mike Samyn" wrote in message ... Ron, I not sure I fully understand but I think what your'e telling me is that the range refence refers to the active sheet only. I haven't tried this yet but what if I switch active sheets between combox setups. Would that then allow me to have multiple combo boxs ref. multiple sheet concurently? -- Mike "Ron de Bruin" wrote: Hi Mike I miss one ) And Cells use the cells on the activesheet now so you must use it like this Sheets("Sheet2").Range(Sheets("Sheet2").Cells(1, 1), Sheets("Sheet2").Cells(10, 3)).Address -- Regards Ron de Bruin http://www.rondebruin.nl "Mike Samyn" wrote in message ... For a given form can I reference multiple sheets within a workbook? Here is what I tried to do but it failed on the second ComboBox. ... ComboBox1.RowSource = Sheets("Sheet1").Range(Cells(1,1),Cells(10,3).Addr ess .... .... ComboBox2.RowSource = Sheets("Sheet2").Range(Cells(1,1),Cells(10,3).Addr ess Thanks Mike |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Combobox rowsource | Excel Programming | |||
UserForm ComboBox RowSource Question | Excel Programming | |||
How can Rowsource be used for a combobox on a form? | Excel Programming | |||
How Do I Load A ComboBox RowSource From The Results Of Another ComboBox | Excel Programming | |||
combobox rowsource | Excel Programming |