#1   Report Post  
Posted to microsoft.public.excel.programming
Ayo Ayo is offline
external usenet poster
 
Posts: 489
Default ComboBOx

How do I link data in a range on a worksheet to a ComboBox on a form?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default ComboBOx

There are a couple of ways. You can use the AddItem method if your data is
not in contiguous cells or you can use the Properties Window utility in the
Visual Basic Editor to set the RowSource, exmpl: a2:a10. If you use the
RowSource it does not like quotation marks or words like cells or Range, just
the A1 style cell designator.

"Ayo" wrote:

How do I link data in a range on a worksheet to a ComboBox on a form?

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
Ayo Ayo is offline
external usenet poster
 
Posts: 489
Default ComboBOx

How do I specifiy which sheet the range, a2:a10, is on.

"JLGWhiz" wrote:

There are a couple of ways. You can use the AddItem method if your data is
not in contiguous cells or you can use the Properties Window utility in the
Visual Basic Editor to set the RowSource, exmpl: a2:a10. If you use the
RowSource it does not like quotation marks or words like cells or Range, just
the A1 style cell designator.

"Ayo" wrote:

How do I link data in a range on a worksheet to a ComboBox on a form?

Thanks

  #4   Report Post  
Posted to microsoft.public.excel.programming
MaC MaC is offline
external usenet poster
 
Posts: 8
Default ComboBOx

Try: SheetName!a2:a10

Mariusz

How do I specifiy which sheet the range, a2:a10, is on.



  #5   Report Post  
Posted to microsoft.public.excel.programming
Ayo Ayo is offline
external usenet poster
 
Posts: 489
Default ComboBOx

That didn't work.

"MaC" wrote:

Try: SheetName!a2:a10

Mariusz

How do I specifiy which sheet the range, a2:a10, is on.






  #6   Report Post  
Posted to microsoft.public.excel.programming
MaC MaC is offline
external usenet poster
 
Posts: 8
Default ComboBOx

Have you put this in RowSource property in VBA editor?
It works for me, e.g.: Numbers!A1:A3.
BTW - another way is to use named range.

Mariusz

Użytkownik "Ayo" napisał w wiadomości
...
That didn't work.

"MaC" wrote:

Try: SheetName!a2:a10

Mariusz

How do I specifiy which sheet the range, a2:a10, is on.






  #7   Report Post  
Posted to microsoft.public.excel.programming
Ayo Ayo is offline
external usenet poster
 
Posts: 489
Default ComboBOx

This is what I have in my code, cboSiteID.RowSource = "H2:H1332", but the
range h2:h1332 is on a sheet named MAO Description.

"MaC" wrote:

Have you put this in RowSource property in VBA editor?
It works for me, e.g.: Numbers!A1:A3.
BTW - another way is to use named range.

Mariusz

UÂżytkownik "Ayo" napisaÂł w wiadomoÂści
...
That didn't work.

"MaC" wrote:

Try: SheetName!a2:a10

Mariusz

How do I specifiy which sheet the range, a2:a10, is on.






  #8   Report Post  
Posted to microsoft.public.excel.programming
MaC MaC is offline
external usenet poster
 
Posts: 8
Default ComboBOx

Well, I think you can modify it this way:

cboSiteID.RowSource = "MAO!H2:H1332"

Regards
Mariusz

Użytkownik "Ayo" napisał w wiadomości
...
This is what I have in my code, cboSiteID.RowSource = "H2:H1332", but the
range h2:h1332 is on a sheet named MAO Description.

"MaC" wrote:

Have you put this in RowSource property in VBA editor?
It works for me, e.g.: Numbers!A1:A3.
BTW - another way is to use named range.

Mariusz

U?ytkownik "Ayo" napisa3 w wiadomo?ci
...
That didn't work.

"MaC" wrote:

Try: SheetName!a2:a10

Mariusz

How do I specifiy which sheet the range, a2:a10, is on.








  #9   Report Post  
Posted to microsoft.public.excel.programming
MaC MaC is offline
external usenet poster
 
Posts: 8
Default ComboBOx

But if your sheet is named "MAO Description" then modify it to:
cboSiteID.RowSource = chr(39) & "MAO Description" & chr(39) & "!H2:H1332"

Regards
Mariusz

Użytkownik "MaC" napisał w wiadomości
...
Well, I think you can modify it this way:

cboSiteID.RowSource = "MAO!H2:H1332"

Regards
Mariusz

Użytkownik "Ayo" napisał w wiadomości
...
This is what I have in my code, cboSiteID.RowSource = "H2:H1332", but the
range h2:h1332 is on a sheet named MAO Description.

"MaC" wrote:

Have you put this in RowSource property in VBA editor?
It works for me, e.g.: Numbers!A1:A3.
BTW - another way is to use named range.

Mariusz

U?ytkownik "Ayo" napisa3 w wiadomo?ci
...
That didn't work.

"MaC" wrote:

Try: SheetName!a2:a10

Mariusz

How do I specifiy which sheet the range, a2:a10, is on.










  #10   Report Post  
Posted to microsoft.public.excel.programming
Ayo Ayo is offline
external usenet poster
 
Posts: 489
Default ComboBOx

Still not working. I am not getting any errors but nothing is showing up in
the combobox.

"MaC" wrote:

Well, I think you can modify it this way:

cboSiteID.RowSource = "MAO!H2:H1332"

Regards
Mariusz

UÂżytkownik "Ayo" napisaÂł w wiadomoÂści
...
This is what I have in my code, cboSiteID.RowSource = "H2:H1332", but the
range h2:h1332 is on a sheet named MAO Description.

"MaC" wrote:

Have you put this in RowSource property in VBA editor?
It works for me, e.g.: Numbers!A1:A3.
BTW - another way is to use named range.

Mariusz

U?ytkownik "Ayo" napisa3 w wiadomo?ci
...
That didn't work.

"MaC" wrote:

Try: SheetName!a2:a10

Mariusz

How do I specifiy which sheet the range, a2:a10, is on.











  #11   Report Post  
Posted to microsoft.public.excel.programming
MaC MaC is offline
external usenet poster
 
Posts: 8
Default ComboBOx

That's right. As I sad after that tip, if then name of sheet sounds "MAO
Description", rebuild your code to:

cboSiteID.RowSource = chr(39) & "MAO Description" & chr(39) & "!H2:H1332"

Regards
Mariusz

Użytkownik "Ayo" napisał w wiadomości
...
Still not working. I am not getting any errors but nothing is showing up
in
the combobox.

"MaC" wrote:

Well, I think you can modify it this way:

cboSiteID.RowSource = "MAO!H2:H1332"

Regards
Mariusz

U?ytkownik "Ayo" napisa3 w wiadomo?ci
...
This is what I have in my code, cboSiteID.RowSource = "H2:H1332", but
the
range h2:h1332 is on a sheet named MAO Description.

"MaC" wrote:

Have you put this in RowSource property in VBA editor?
It works for me, e.g.: Numbers!A1:A3.
BTW - another way is to use named range.

Mariusz

U?ytkownik "Ayo" napisa3 w wiadomo?ci
...
That didn't work.

"MaC" wrote:

Try: SheetName!a2:a10

Mariusz

How do I specifiy which sheet the range, a2:a10, is on.











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
fill combobox depending on selection from another combobox Adam Francis Excel Discussion (Misc queries) 2 July 24th 08 07:39 PM
Combobox items determined by the selection in another combobox Alerion Excel Programming 2 September 13th 06 01:07 PM
Combobox options based on the input of another combobox afmullane[_5_] Excel Programming 1 May 3rd 06 01:44 PM
ComboBox list reliant on the entry from a different ComboBox ndm berry[_2_] Excel Programming 4 October 4th 05 04:40 PM
How Do I Load A ComboBox RowSource From The Results Of Another ComboBox Minitman[_4_] Excel Programming 3 October 26th 04 07:58 PM


All times are GMT +1. The time now is 02:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright Š2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"