![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Location: Campbell-Ewald
Posts: 46
|
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. |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Denver, Colorado USA
Posts: 4,014
|
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.
__________________
Keep Excelling. Damon VBAexpert Excel Consulting (My other life: http://damonostrander.com ) |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|