Home |
Search |
Today's Posts |
#1
|
|||
|
|||
VBA Form Combo Box question.
Help !!!
I know this is most likely a simple question, but I'm stuck :( I not to populate a Combo box in an Excel spread sheet I just enter the location in the ListFillRange (EmpData!A1:A100). But I got creative and tryed making a Userform with VBA. Now I'm lost :( In VBA the combo box doesn't have a ListFillRange.... One place I read to enter the location in the ControlSource field, but it doesn't take the information. It keeps giving me an error message. Can anyone Help Please? Thanks Wally |
#2
|
|||
|
|||
See response in worksheetfunctions.
-- HTH RP (remove nothere from the email address if mailing direct) "WTG" wrote in message ... Help !!! I know this is most likely a simple question, but I'm stuck :( I not to populate a Combo box in an Excel spread sheet I just enter the location in the ListFillRange (EmpData!A1:A100). But I got creative and tryed making a Userform with VBA. Now I'm lost :( In VBA the combo box doesn't have a ListFillRange.... One place I read to enter the location in the ControlSource field, but it doesn't take the information. It keeps giving me an error message. Can anyone Help Please? Thanks Wally |
#3
|
|||
|
|||
But it has a .rowsource property that you can use.
In fact, you can use it in code, too: Option Explicit Private Sub UserForm_Initialize() Me.ComboBox1.RowSource _ = Worksheets("sheet1").Range("a1:a10").Address(exter nal:=True) End Sub WTG wrote: Help !!! I know this is most likely a simple question, but I'm stuck :( I not to populate a Combo box in an Excel spread sheet I just enter the location in the ListFillRange (EmpData!A1:A100). But I got creative and tryed making a Userform with VBA. Now I'm lost :( In VBA the combo box doesn't have a ListFillRange.... One place I read to enter the location in the ControlSource field, but it doesn't take the information. It keeps giving me an error message. Can anyone Help Please? Thanks Wally -- Dave Peterson |
#4
|
|||
|
|||
Just to add, ControlSource is the equivalent of LinkedCell
-- Regards, Tom Ogilvy "Dave Peterson" wrote in message ... But it has a .rowsource property that you can use. In fact, you can use it in code, too: Option Explicit Private Sub UserForm_Initialize() Me.ComboBox1.RowSource _ = Worksheets("sheet1").Range("a1:a10").Address(exter nal:=True) End Sub WTG wrote: Help !!! I know this is most likely a simple question, but I'm stuck :( I not to populate a Combo box in an Excel spread sheet I just enter the location in the ListFillRange (EmpData!A1:A100). But I got creative and tryed making a Userform with VBA. Now I'm lost :( In VBA the combo box doesn't have a ListFillRange.... One place I read to enter the location in the ControlSource field, but it doesn't take the information. It keeps giving me an error message. Can anyone Help Please? Thanks Wally -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Using a combo box in an Excel form | Excel Discussion (Misc queries) | |||
extract data from combo box n use it in SQL | Excel Discussion (Misc queries) | |||
dynamic combo boxes | Excel Worksheet Functions | |||
Form Combo Box | Excel Discussion (Misc queries) | |||
Combo Box Question | Excel Worksheet Functions |