Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How do I link data in a range on a worksheet to a ComboBox on a form?
Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try: SheetName!a2:a10
Mariusz How do I specifiy which sheet the range, a2:a10, is on. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That didn't work.
"MaC" wrote: Try: SheetName!a2:a10 Mariusz How do I specifiy which sheet the range, a2:a10, is on. |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
fill combobox depending on selection from another combobox | Excel Discussion (Misc queries) | |||
Combobox items determined by the selection in another combobox | Excel Programming | |||
Combobox options based on the input of another combobox | Excel Programming | |||
ComboBox list reliant on the entry from a different ComboBox | Excel Programming | |||
How Do I Load A ComboBox RowSource From The Results Of Another ComboBox | Excel Programming |