Diff betw 'toolbar' Listbox and 'macro' listbox

dcoons

Board Regular
Joined
Apr 21, 2002
Messages
56
why are there difference between a listbox created with the vba toolbar (on a spreadsheet) and one created using worksheets().dropdowns.add (also on a spreadsheet)?

the toolbar version allows much more control than the 'macro' version, which only allows access to a linkedcell, item list, and a hook for an "onchange" macro. No formatting or other handling.

Is it possible to create the toolbar version from a macro? I have tried creating one manually and then accessing it from a macro, but it doesn't seem to be part of the worksheet collections.
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Hi dcoons,

The reason why the two dropdowns have different functionality is that they are not at all the same object. There are two different types of dropdown controls available in Excel, Forms controls (accessible via the Forms toolbar), and ActiveX controls (accessible via the Controls toolbar). They look the same, but are totally different. The Forms controls are easier to use in Excel, but have considerably less functionality than the ActiveX controls. Apparently the control you are adding manually is from the Controls toolbar, while the one you are adding programmatically is the Forms type. Either type can be added either programmatically or manually--you just have to be aware of which you are adding. In addition, from VBA you have complete access to all the properties of both types, but the ActiveX controls have many more properties than the Forms controls do.

I hope this helps clear up the confusion.
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,202
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top