Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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
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
Combobox rowsource Marinos Andreou Excel Programming 2 March 7th 06 05:08 PM
UserForm ComboBox RowSource Question Minitman[_4_] Excel Programming 0 November 15th 05 07:03 PM
How can Rowsource be used for a combobox on a form? Matt[_33_] Excel Programming 5 October 25th 05 03:00 AM
How Do I Load A ComboBox RowSource From The Results Of Another ComboBox Minitman[_4_] Excel Programming 3 October 26th 04 07:58 PM
combobox rowsource Newbie Excel Programming 1 September 8th 04 12:21 PM


All times are GMT +1. The time now is 11:45 AM.

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"