Workbooks.Open filename:="C:\Strategy\Rates.xls"
This is a discussion on Run-Time Error '1004': Method 'Open' of Object 'Workbooks' F within the Excel Questions forums, part of the Question Forums category; I've seen several different posts for this error but can't seem to find the answer I am looking for. I ...
I've seen several different posts for this error but can't seem to find the answer I am looking for. I have the following Code in VB:
Workbooks.Open filename:=("C:\Strategy\Rates.xls")
This command use to work just fine with no problems what so ever. but now I got a new pc and I get the following error:
Run-Time Error '1004': Method 'Open' of Object 'Workbooks' Failed
and the debug highlights the command above. Any Clues??
I am running on Windows Xp, Office 2003. Excel 2003 with SP2. All the programs and OS are identical to what it was before the new pc. Even the PC's are the same. It's just a new one.
I can run this report on another pc with the same os and office product and it runs beautifully.
Hope someone out there can help.
Thank you.
Workbooks.Open filename:="C:\Strategy\Rates.xls"
Sitaram
RevPar
It tells that you don't have the file.
Checked the file to and it is sitting in the correct location. What I don't understand is that this report worked perfectly before. Nothing has changed but the pc. Any other clues?
I've read somewhere that certain add in's are missing based upon how microsoft office was loaded. Ie Upgraded to 2003 from version 2002 or 2000 versus a new pc with Office 2003 as the first software loaded. Does that make any sense to anyone?
Thanks again for the help.
Is the file really in the C:\Strategy folder?
Do you have access to that folder?
Can you open the folder in the Windows Explorer?
Can you open the file from inside XL with File | Open...?
Checked the file to and it is sitting in the correct location. What I don't understand is that this report worked perfectly before. Nothing has changed but the pc. Any other clues?
I've read somewhere that certain add in's are missing based upon how microsoft office was loaded. Ie Upgraded to 2003 from version 2002 or 2000 versus a new pc with Office 2003 as the first software loaded. Does that make any sense to anyone?
Thanks again for the help.
Tushar Mehta (Microsoft MVP Excel 2000-present)
Excel & PowerPoint tutorials and add-ins; custom productivity solutions for MS Office
Yes to all four questions. This is the only machine it doesn't run on. Haven't had trouble on any other pc. I'm lost. Any other clues?
I am having this exact problem except mine was running fine on this machine until about mid day yesterday. After that it just randomly stopped working on my machine. I've tried moving the file to different directories and opening it from there but I still get the same error. I can open the csv file from explorer and excel without a problem I just can't seem to open it through a macro. any ideas?
Bookmarks