Results 1 to 7 of 7

Run-Time Error '1004': Method 'Open' of Object 'Workbooks' F

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 ...

  1. #1
    New Member
    Join Date
    Jan 2007
    Posts
    7

    Default Run-Time Error '1004': Method 'Open' of Object 'Workbooks' F

    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.

  2. #2
    Board Regular P Sitaram's Avatar
    Join Date
    Jun 2003
    Posts
    1,974

    Default

    Workbooks.Open filename:="C:\Strategy\Rates.xls"
    Sitaram

  3. #3
    MrExcel MVP
    Join Date
    Aug 2004
    Location
    Tokyo, Japan
    Posts
    16,995

    Default

    RevPar

    It tells that you don't have the file.

  4. #4
    New Member
    Join Date
    Jan 2007
    Posts
    7

    Default

    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.

  5. #5
    MrExcel MVP tusharm's Avatar
    Join Date
    May 2002
    Posts
    10,924

    Default

    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.

  6. #6
    New Member
    Join Date
    Jan 2007
    Posts
    7

    Default

    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?

  7. #7
    New Member
    Join Date
    Jan 2007
    Posts
    34

    Default

    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?

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


DMCA.com