Workbook is viewable in VBE after I close it

T

Tim Zych

I'm using ADO to grab some data from an XL workbook. After the macros run,
when I close the workbook where the code resides, I can see the workbook in
the VBE. I have closed the recordset object and set it to nothing but the
workbook properties are still visible. I can even view the code and copy it.
If I try to re-run the "closed" workbook, I get the error 429 "ActiveX
component can't create object." Typing End in the immediate window doesn't
help.

Interestingly, if I open the ADO macros workbook but don't run the macros,
then close it, the workbook closes normally with no phantom in the VBE.

Anybody know if this is related to ADO and what I can do to fix it? I have
not seen this before with other workbooks.

Thanks.
 
T

Tim Zych

Thanks. That was it. I was querying an open workbook. I've changed it so
that I only query a closed workbook and the problem is fixed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top