Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default Runtime error 1004

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?



--
Ajit
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 212
Default Runtime error 1004

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

"Ajit" wrote in message
...
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?



--
Ajit



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default Runtime error 1004

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

"Sharad Naik" wrote:

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

"Ajit" wrote in message
...
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?



--
Ajit




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
What causes runtime error 1004? [email protected] Excel Discussion (Misc queries) 4 October 27th 05 07:15 PM
runtime error 1004 valdesd Excel Discussion (Misc queries) 0 October 12th 05 05:30 PM
Excel 2003 Macro Error - Runtime error 1004 Cow Excel Discussion (Misc queries) 2 June 7th 05 01:40 PM
Runtime error 1004 Jeannette[_2_] Excel Programming 0 May 13th 04 06:31 AM
Runtime Error 1004 Don[_7_] Excel Programming 2 September 16th 03 08:32 AM


All times are GMT +1. The time now is 10:30 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"