Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro runtime 1004 error on opening worksheet | Excel Discussion (Misc queries) | |||
runtime error 1004 | Excel Discussion (Misc queries) | |||
Another runtime 1004 error | Excel Discussion (Misc queries) | |||
excel chart export error runtime 1004 | Charts and Charting in Excel | |||
Excel 2003 Macro Error - Runtime error 1004 | Excel Discussion (Misc queries) |