Combo box problem

  • Thread starter Thread starter jellobze1
  • Start date Start date
J

jellobze1

HI.

I'm using Excel VBA. I have a combo box in a template sheet with th
fillrange set to a range in a separate data sheet in another workbook
workbook1. The combo box reads fine when I open both workbook
separately and manually but when I use a command button from Workbook
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 th
template. Is there any way to do this, since I trie
activesheet.cboChoose.refresh and got an error that "this objec
doesn't support this property or method". I even trie
activesheet.cboChoose.requery and got the same error.

Any other ideas would be greatly appreciated.

Thanks in advance.
Angel
 
Believe the source workbook will need to be opened. Comboboxes know nothing
about external links to closed workbooks.
 
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
 
Back
Top