Documents referencing a ~tmp file ?

B

Ben M

I have several hundred documents that were created using a VBA
template.

Occasionally when closing of the documents based on the template, I
get the error "This document cannot be closed because it is referenced
by an open VBA project. You should close the project that references
this document before closing this document."

The documents that seem to do this have a weird reference to
~wrc004.tmp etc.

How can I remove the references for ALL documents and replace them
with the correct one programatically?

Why would this be happening?

Thanks! Ben
 
C

Chuck

You may have objects that are created by code in the template but are not
properly destroyed and so stay alive and referenced? Are you sure your code
ends all operations, closes all sessions and destroys all objects properly?
 

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