+ Reply to Thread
Results 1 to 3 of 3

Combo box problem

  1. #1
    Registered User
    Join Date
    10-28-2005
    Posts
    2

    Combo box problem

    HI.

    I'm using Excel VBA. I have a combo box in a template sheet with the fillrange set to a range in a separate data sheet in another workbook, workbook1. The combo box reads fine when I open both workbooks separately and manually but when I use a command button from Workbook1 to open the template the combo box no longer shows my options.

    I'm thinking the combo box needs to be refreshed after I open the template. Is there any way to do this, since I tried activesheet.cboChoose.refresh and got an error that "this object doesn't support this property or method". I even tried activesheet.cboChoose.requery and got the same error.

    Any other ideas would be greatly appreciated.

    Thanks in advance.
    Angelo

  2. #2
    Tom Ogilvy
    Guest

    Re: Combo box problem

    Believe the source workbook will need to be opened. Comboboxes know nothing
    about external links to closed workbooks.

    --
    Regards,
    Tom Ogilvy


    "jellobze1" <[email protected]> wrote
    in message news:[email protected]...
    >
    > HI.
    >
    > I'm using Excel VBA. I have a combo box in a template sheet with the
    > fillrange set to a range in a separate data sheet in another workbook,
    > workbook1. The combo box reads fine when I open both workbooks
    > separately and manually but when I use a command button from Workbook1
    > to open the template the combo box no longer shows my options.
    >
    > I'm thinking the combo box needs to be refreshed after I open the
    > template. Is there any way to do this, since I tried
    > activesheet.cboChoose.refresh and got an error that "this object
    > doesn't support this property or method". I even tried
    > activesheet.cboChoose.requery and got the same error.
    >
    > Any other ideas would be greatly appreciated.
    >
    > Thanks in advance.
    > Angelo
    >
    >
    > --
    > jellobze1
    > ------------------------------------------------------------------------
    > jellobze1's Profile:

    http://www.excelforum.com/member.php...o&userid=28431
    > View this thread: http://www.excelforum.com/showthread...hreadid=480245
    >




  3. #3
    Registered User
    Join Date
    10-28-2005
    Posts
    2

    fixed

    Tom, thanks for the reply. i found the problem. in my VB code i was opening a new application and not using the same one already opened. (XLAPP = new excel.application) In this new XLAPP is where i would then open the new file. (XLAPP.workbooks.open(File)).
    For some reason, although the other application and source workbook remained opened, it would not load the combo box's source data.
    Now i just open the new file in the same application window and it works just fine.
    Thanks for your input.

    Angelo

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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