Runtime error 1004

A

Ajit

I have an excel spreadsheet that uses a macro to open
another excel spreadsheet via Workbooks.Open(filename)


On my local drive this works fine and it opens the second
file, runs the query, and closes it without complaint.
When I run it via a network drive it works fine as well.


However, when I try to run it via a browser (i.e. put the
file on a web server and then open the url as
http://www.whatever.com/myfile.xls") and then run the
macro I get a runtime error 1004 stating "Method 'Open' of
object 'Workbooks' failed".


Any idea what is causing this?
 
S

Sharad Naik

Which version of excel are you using?
I am not sure which version will give what ever if
file could not be opened for any reason.

Did you try opening the file in internet explorer manually?
i.e. copy the url you have entered in to your code,
start IE, paste it in the address bar of IE and hit enter.
Dose the file open there?

Sharad
 
A

Ajit

I am using Excel 2000.
and yes it opens if i try to open it directly. It even works if i try to run
the macro from my PC. It only gives a problem when i try to open the master
file through IE and run the macro
 

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