error during macro execution.

M

michael

I have a macro written in VB6 and running within Excel 2000. The macro
uses the Application OnTime method to schedule certain tasks, such as
communicating with a laboratory instrument. On occassion I will
recieve a pop up error from Excel that basically says:

"A document with the name 'My Document Name Here' is already open.
You cannot open two documents with the same name, even if the
documents are in different folders. To open the second document,
either close the document that's already open, or rename one of the
documents."

Two strange things about this error are that
1. Nothing in my code instructs Excel to open or close the document,
ever.
2. The error occurs only sporadically. I can run the macro several
times with no error, or the macro can throw the error during several
consecutive executions.

I have placed On Error Resume Next statements in all of my routines.
The only other thing that I can think of is to upgrade to Excel 2002,
2003, or 2007.

Does anybody have an idea as to the source of the error?
 

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