ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Referencing a dropdown box on a worksheet (https://www.excelbanter.com/excel-discussion-misc-queries/56953-referencing-dropdown-box-worksheet.html)

Gene

Referencing a dropdown box on a worksheet
 
I have a combo(dropdown)box* on a worksheet that I would like to
initialize with VBA. All (or at least most) of the examples I've seen
in the newsgroup initialize one on a form, not a worksheet.

I actually have three comboboxes on this worksheet. Two of them have a
"Sheet_" prefix, when I added the third, it doesn't, and I can't figure
out what I did different, if anything.

The asterisk above...is there a difference between a combo and dropdown
box, or are they synonymous?

Thanks in advance for the help, and have a great Thanksgiving to all...


Dave Peterson

Referencing a dropdown box on a worksheet
 
There's a combobox from the control toolbox toolbar.

There's a dropdown from the Forms toolbar.

The tooltip shows "Combo Box" when you linger the mouse over each.

The look kind of the same, but behave differently.

You can rightclick on the combobox (from the control toolbox toolbar) and see
all its many properties via Properties (while in design mode--another icon on
that control toolbox toolbar).

You rightclick on the dropdown and choose Format control, and you'll see a lot
fewer properties that you can control.

(The combobox also has a "format control" option, but you'll notice that there's
a tab missing from its dialog--you get that stuff through the properties.)

If you select either of the shapes, you can change its name by typing the new
name in the namebox--to the left of the formula bar. (Hit enter when you're
done typing.)

=======
On top of these two, there's another "dropdown" type. Data|Validation. It's
usually much simpler to implement, but offers less features.

Debra Dalgleish has lots of info about data|validation at:
http://www.contextures.com/xlDataVal01.html


Gene wrote:

I have a combo(dropdown)box* on a worksheet that I would like to
initialize with VBA. All (or at least most) of the examples I've seen
in the newsgroup initialize one on a form, not a worksheet.

I actually have three comboboxes on this worksheet. Two of them have a
"Sheet_" prefix, when I added the third, it doesn't, and I can't figure
out what I did different, if anything.

The asterisk above...is there a difference between a combo and dropdown
box, or are they synonymous?

Thanks in advance for the help, and have a great Thanksgiving to all...


--

Dave Peterson


All times are GMT +1. The time now is 02:22 AM.

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