Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default runtime error 1004 when opening excel file via VBA in a browser

Hello,

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?

To complicate matters more, when it gives me the error it
gives me the option of "End" or "Debug". If I click Debug
it brings up the code window. If I then click Run without
making any changes it runs properly.

Help!

Thanks,

Ken Hunter
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default runtime error 1004 when opening excel file via VBA in a browser

What version of excel is installed on the webserver is
irrelevant as the file is being opened on the client's pc.
(for the record excel is not even on the webserver).

Let me put the problem another way. If you have a file
called c:\file1.xls with a button that does
workbooks.open "c:\file2.xls". Open IE and drag file1.xls
into the browser - it will not work.

And no - making IE load excel outside the browser is not
an option - it is a locked down desktop.

Ken

-----Original Message-----

Ken,

Make sure the correct version of Excel is installed on

the web server. Also
check out the KB article

Q135390 XL: Sample Macro to Open or Activate a Workbook
http://support.microsoft.com/?id=135390

which has information about similar error arising from

Workbook Open /
activation.

Thanks,

Jim

Jim Vita
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and

confers no rights.

.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default runtime error 1004 when opening excel file via VBA in a browser


Hi,

If dragging an xls file to the browser window doesn't work then it's most
likely Excel isn't installed properly on the client. It could be the
browser as well. Try doing a repair installation from the control panel.

Thanks,

Jim

Jim Vita
Microsoft Developer Support

Microsoft Security Announcement: Have you installed the patch for Microsoft
Security Bulletin MS03-026?*If not Microsoft strongly advises you to review
the information at the following link regarding Microsoft Security Bulletin
MS03-026 http://www.microsoft.com/security/se...s/ms03-026.asp
and/or to visit Windows Update at http://windowsupdate.microsoft.com to
install the patch. Running the SCAN program from the Windows Update site
will help to insure you are current with all security patches, not just
MS03-026.

This posting is provided "AS IS" with no warranties, and confers no rights.

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
Macro runtime 1004 error on opening worksheet Shaggyjh Excel Discussion (Misc queries) 5 May 6th 09 12:37 PM
runtime error 1004 valdesd Excel Discussion (Misc queries) 2 October 12th 05 03:20 PM
Another runtime 1004 error [email protected] Excel Discussion (Misc queries) 2 September 17th 05 09:21 AM
excel chart export error runtime 1004 Mau Charts and Charting in Excel 3 August 17th 05 11:35 AM
Excel 2003 Macro Error - Runtime error 1004 Cow Excel Discussion (Misc queries) 2 June 7th 05 01:40 PM


All times are GMT +1. The time now is 04:32 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"