Workbooks.open command

C

carl

This command is failing for some of my users with a 1004
error, while for other users there's no problem. Can
anyone shed any light on this
 
G

George Nicholson

There are several reasons why it might fail sometimes and not others:

Workbooks.Open "MyFile.xls" will return a 1004 error if the the path/file
doesn't exist.

1004 will also be generated if the specified file is already open on the
user's machine.

The Open method has a Notify argument that handles cases where another user
has the file open. If set to True, a notification message will be returned.
If set to False or omitted, Open simply raises an error. I don't know what
the error is, but I would not bet against 1004. (Of course, this assumes
that you don't have Notify set to True).

I'm sure there are other possibilities, but these would seem to be the major
ones.

Hope this helps (& Good Luck),
 

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