Excel 2000 file in use when opening xls file

H

htrajt

I receive this message nearly every time I open a modified and previously
saved file on my drive only. The excel files when I get this message are
usually outputs of my own modules that are created by Microsoft Visual Basic
6.0 under the Visual Basic Editor toolbar. Sometimes both the excecl file
that creates the outputs of the modules gives me the read only message, and
also the outputs themselves give me the message. I've wondered if Norton is
hanging onto the files for moments after being created? and that is why I get
the message? If I click cancel, then I can just double click the file again
to open and it always opens the second time without the message. This is not
a matter of checking properties on the file, because I am constantly using
the excel file with the programmed code in the modules, and the outputs are
new creations coming out of the modules as outputs.
Title bar of dialog box reads “File in Useâ€
Luxd-sum.xls is locked for editing
By “ownerâ€
Click Notify to open a read-only copy of the document and receive
notification when the document is no longer in use.
Click choices
Readon only
Notify
Cancel
 
J

Jon Peltier

I wonder whether you're confusing VB6 and VBA.

If you are referring to VB6, did your automation properly shut down the
instance of Excel used when creating the workbook? If not, there may be a
hidden instance of Excel, which has a copy of the file open. Look in the
Task Manager for extra EXCEL.EXE processes.

- Jon
 
H

htrajt

I thought Vb6 only because when you go to "about" under the macro screen it
reads that way, but I am like you in thinking it is actually using Microsoft
Visual Studio 2003 which is installed on my pc. If the process is not
closing, then I will need to write a subroutine that does this? I don't get
many crashes while the files are being built. Just today I opened
"Program.xls" (after I had rebooted and opened other excel files, (but not
this one), an hour later after closing all the other excel files, Program.xls
gave me the same read only message.
 
J

Jon Peltier

Was there a hidden Excel window, only detectable as an extra item listed in
the Task Manager?

If this remains after running your automation code, you need to make sure
that at the end of your routine you close all documents, release all object
variables, then quit Excel and release the Excel application variable.

You ought to be able to find something relevant on Google. I have not used
versions of VS later than 6 to do this, so I don't know the steps.

- Jon
 

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

Similar Threads


Top