Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Using a combo box in an Excel form
I'm experienced with Excel & VBA, but new to using Excel to create a form.
I would like to simply use a cell as a drop down. Not knowing if that is possible, I have added a combo box to the spreasheet, but I am unclear how the data entered/selected in the drop down will be stored. Is it stored as a VB variable associated with the control or do I link the control to a cell to store the data? To define the values in the drop down/combo box, do I have to use cell references or can I write in the values in the properties (writing them in hasn't worked for me)? Finally, what property do I have to set for the combo box (ActiveX control) to automatically move & size with the cell? Direct answers, links to web sites, any help is greatly appreciated. Thanks in advance. |
#2
|
|||
|
|||
Hi
the easiest way to get a drop down in a cell is to use data / validation - Debra Dalgleish has great notes on her site at www.contextures.com/tiptech.html ... look for Data Validation - Basics and then all the other stuff you can do with it. Cheers JulieD "xlcharlie" wrote in message ... I'm experienced with Excel & VBA, but new to using Excel to create a form. I would like to simply use a cell as a drop down. Not knowing if that is possible, I have added a combo box to the spreasheet, but I am unclear how the data entered/selected in the drop down will be stored. Is it stored as a VB variable associated with the control or do I link the control to a cell to store the data? To define the values in the drop down/combo box, do I have to use cell references or can I write in the values in the properties (writing them in hasn't worked for me)? Finally, what property do I have to set for the combo box (ActiveX control) to automatically move & size with the cell? Direct answers, links to web sites, any help is greatly appreciated. Thanks in advance. |
#3
|
|||
|
|||
If you just need a dropdown to select an item from a list you won't need any
VBA http://www.contextures.com/xlDataVal01.html -- Regards, Peo Sjoblom "xlcharlie" wrote in message ... I'm experienced with Excel & VBA, but new to using Excel to create a form. I would like to simply use a cell as a drop down. Not knowing if that is possible, I have added a combo box to the spreasheet, but I am unclear how the data entered/selected in the drop down will be stored. Is it stored as a VB variable associated with the control or do I link the control to a cell to store the data? To define the values in the drop down/combo box, do I have to use cell references or can I write in the values in the properties (writing them in hasn't worked for me)? Finally, what property do I have to set for the combo box (ActiveX control) to automatically move & size with the cell? Direct answers, links to web sites, any help is greatly appreciated. Thanks in advance. |
#4
|
|||
|
|||
what about if I want to set up a default value for the drop-down? Data
validation does not default to a particular selection. "Peo Sjoblom" wrote: If you just need a dropdown to select an item from a list you won't need any VBA http://www.contextures.com/xlDataVal01.html -- Regards, Peo Sjoblom "xlcharlie" wrote in message ... I'm experienced with Excel & VBA, but new to using Excel to create a form. I would like to simply use a cell as a drop down. Not knowing if that is possible, I have added a combo box to the spreasheet, but I am unclear how the data entered/selected in the drop down will be stored. Is it stored as a VB variable associated with the control or do I link the control to a cell to store the data? To define the values in the drop down/combo box, do I have to use cell references or can I write in the values in the properties (writing them in hasn't worked for me)? Finally, what property do I have to set for the combo box (ActiveX control) to automatically move & size with the cell? Direct answers, links to web sites, any help is greatly appreciated. Thanks in advance. |
#5
|
|||
|
|||
Hi Charlie
once you've set up data validation, type the "default" value in the cell. - if you're using this workbook as a template it will always be there. Cheers JulieD "xlcharlie" wrote in message ... what about if I want to set up a default value for the drop-down? Data validation does not default to a particular selection. "Peo Sjoblom" wrote: If you just need a dropdown to select an item from a list you won't need any VBA http://www.contextures.com/xlDataVal01.html -- Regards, Peo Sjoblom "xlcharlie" wrote in message ... I'm experienced with Excel & VBA, but new to using Excel to create a form. I would like to simply use a cell as a drop down. Not knowing if that is possible, I have added a combo box to the spreasheet, but I am unclear how the data entered/selected in the drop down will be stored. Is it stored as a VB variable associated with the control or do I link the control to a cell to store the data? To define the values in the drop down/combo box, do I have to use cell references or can I write in the values in the properties (writing them in hasn't worked for me)? Finally, what property do I have to set for the combo box (ActiveX control) to automatically move & size with the cell? Direct answers, links to web sites, any help is greatly appreciated. Thanks in advance. |
#6
|
|||
|
|||
Nevermind, I think I found my answer.
"Peo Sjoblom" wrote: If you just need a dropdown to select an item from a list you won't need any VBA http://www.contextures.com/xlDataVal01.html -- Regards, Peo Sjoblom "xlcharlie" wrote in message ... I'm experienced with Excel & VBA, but new to using Excel to create a form. I would like to simply use a cell as a drop down. Not knowing if that is possible, I have added a combo box to the spreasheet, but I am unclear how the data entered/selected in the drop down will be stored. Is it stored as a VB variable associated with the control or do I link the control to a cell to store the data? To define the values in the drop down/combo box, do I have to use cell references or can I write in the values in the properties (writing them in hasn't worked for me)? Finally, what property do I have to set for the combo box (ActiveX control) to automatically move & size with the cell? Direct answers, links to web sites, any help is greatly appreciated. Thanks in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? | Excel Discussion (Misc queries) | |||
Can I copy a combo box in Excel 2002 with a relative cell link? | Excel Discussion (Misc queries) | |||
Excel merge or data form (for invoice)..help!! | Excel Worksheet Functions | |||
merge excel form with excel datadase how can i do | Excel Worksheet Functions | |||
How do I set up a field in an Excel form to number it incremental. | Excel Worksheet Functions |