ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Excel 2007 Combo Box questions (https://www.excelbanter.com/excel-discussion-misc-queries/251424-excel-2007-combo-box-questions.html)

Silvio

Excel 2007 Combo Box questions
 
Hello, I am new to Excel and I have 3 question regarding Combo Box:
1. When adding a Combo Box from the ActiveX group, how do I populate the
combo box list to select from?
2. Can the font be changed and if so, how?
3. Where do I write a code to execute once a selection is made from the
Combo Box?
Thank you,
Silvio


Dave Peterson

Excel 2007 Combo Box questions
 
You can use a single column range that is used as the source.

Go into design mode (another icon on that control toolbox toolbar) if you have
to. Then rightclick on the combobox.

Choose Properties.
Then look for ListFillRange and type in the address to use.

You may not need a macro, you may be able to use a linkedcell (another property
you can specify) and formulas???

But if you do, you can double click on that combobox while in design mode and
you'll be taken to the VBE (where macros live). You'll be in the worksheet
module for the sheet that owns that combobox.

You'll see something like:

Option Explicit
Private Sub ComboBox1_Change()

End Sub

And your code would/may go in that procedure.

There are lots of events that you can use for comboboxes from the control
toolbox toolbar.

And look for Font in that property list. You'll see how you can adjust that,
too.

Silvio wrote:

Hello, I am new to Excel and I have 3 question regarding Combo Box:
1. When adding a Combo Box from the ActiveX group, how do I populate the
combo box list to select from?
2. Can the font be changed and if so, how?
3. Where do I write a code to execute once a selection is made from the
Combo Box?
Thank you,
Silvio


--

Dave Peterson


All times are GMT +1. The time now is 09:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com