+ Reply to Thread
Results 1 to 5 of 5

How to instantiate a combobox object in vba without placing one on a sheet or user form.

  1. #1
    Registered User
    Join Date
    03-26-2013
    Location
    Kimball, MN
    MS-Off Ver
    Excel 2003
    Posts
    2

    Arrow How to instantiate a combobox object in vba without placing one on a sheet or user form.

    I have a vendor product that uses an Excel VBA API for access to data. One of the routines provides a key set of data values only by passing in a combobox and letting their routine populate it. I can then process the data in the combobox to get the data I need.

    Some applications of this data lend themselves to a UI display of a combobox and letting the user choose. I have an application then needs to be entirely automatic (no user intervention). Therefore, I need to create a combobox to pass to their routine without the display of a datasheet or user form with the control on it.

    I have searched a number of sources (printed and online) and have not found a way to do this. I realize it may be a bit "unusual", but I'm beginning to wonder if it is possible at all? Is there a way to do this ... how?

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: How to instantiate a combobox object in vba without placing one on a sheet or user for

    you cannot create a combo box without putting a control somewhere
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: How to instantiate a combobox object in vba without placing one on a sheet or user for

    thanks for the rep-I assume this can be closed?

    by the way you could always put a control onto a sheet that the user can't see (either a hidden sheet or a control with no width or height) and then delete it

  4. #4
    Registered User
    Join Date
    03-26-2013
    Location
    Kimball, MN
    MS-Off Ver
    Excel 2003
    Posts
    2

    Lightbulb Re: How to instantiate a combobox object in vba without placing one on a sheet or user for

    Thanks for the help. I was afraid that was the answer.
    Yes, I have begun reworking the application to use a sheet that never gets "activated" but holds the combo box.
    This should work - post can be closed!

  5. #5
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: How to instantiate a combobox object in vba without placing one on a sheet or user for

    it seems I may have been too hasty-after a little experimentation this appears to work
    Please Login or Register  to view this content.
    whether it will work as an argument for your called function I cannot say ;-)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1