Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: Diff betw 'toolbar' Listbox and 'macro' listbox

  1. #1
    Board Regular
    Join Date
    Apr 2002
    Location
    Campbell-Ewald
    Posts
    56
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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. #2
    MrExcel MVP Damon Ostrander's Avatar
    Join Date
    Feb 2002
    Location
    Denver, Colorado USA
    Posts
    4,239
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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
    LinkedIn Profile http://www.linkedin.com/pub/damon-ostrander/7/79/a93
    AllExperts Profile http://www.allexperts.com/ep/1059-30...-Ostrander.htm

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •