+ Reply to Thread
Results 1 to 4 of 4

Run-time error' 1004'; Method 'OpenText' of object 'Workbooks' failed

  1. #1
    Forum Contributor
    Join Date
    06-11-2018
    Location
    Lebanon, NH
    MS-Off Ver
    2000 and 2010
    Posts
    106

    Run-time error' 1004'; Method 'OpenText' of object 'Workbooks' failed

    Good morning,
    I am tying to make a macro from Excel 2010 run correctly in Excel 2000. This works perfectly in Excel 2010 VBA. When I try to run it from a laptop running Excel 2000 it gives me the above error. I verified the syntax. I have verified that the file path and name are correct. I verified that the S: network drive was there and accessible. I googled the error and found a couple possibilities that don't look to be causing the error.
    Any thoughts as to what is causing my problem? I would be very grateful for any input
    Thanks
    Bill
    The macro errors out on this line;
    Please Login or Register  to view this content.
    Here is the macro in it's entirety;

    Please Login or Register  to view this content.
    Last edited by billfinnjr; 08-31-2018 at 11:44 AM. Reason: Resolved

  2. #2
    Forum Contributor
    Join Date
    06-11-2018
    Location
    Lebanon, NH
    MS-Off Ver
    2000 and 2010
    Posts
    106

    Re: Run-time error' 1004'; Method 'OpenText' of object 'Workbooks' failed

    I neglected to mention that I tried commenting out the code after Workbooks.OpenText filename:= _
    "H:\Estimator\QPQUPRFIL_GJH_QDFTJOBD*.txt". It solved the problem but left me with a new one, as it errored out on the line ActiveSheet.Paste Destination:=Worksheets("Item Master").Range("A1:C88888")
    Thanks,
    Bill

  3. #3
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,973

    Re: Run-time error' 1004'; Method 'OpenText' of object 'Workbooks' failed

    I believe max # of rows in Excel 2000 is 65,536. Hence the error.
    "Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something."
    ― Robert A. Heinlein

  4. #4
    Forum Contributor
    Join Date
    06-11-2018
    Location
    Lebanon, NH
    MS-Off Ver
    2000 and 2010
    Posts
    106

    Re: Run-time error' 1004'; Method 'OpenText' of object 'Workbooks' failed

    Thanks for the input CK76. I tried changing that parameter to an upper limit of 65,536 but got the same error. I tried changing the paste statement from Range "(A1:C88888)" to simply Range ("A1") and that took care of my second error and the macro ran to completion. I appreciate your taking the time to reply, you got me thinking differently and that did the trick.

    thanks!
    Bill

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. run time error 1004 method open of object workbooks failed
    By bennyamy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-24-2017, 05:09 PM
  2. Run-time error 1004 Method Open of object Workbooks Failed
    By Rikimaru82 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-29-2016, 04:32 AM
  3. [SOLVED] run-time error '1004' method 'open' of object 'workbooks' failed
    By mattress58 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-03-2016, 06:24 PM
  4. [SOLVED] Run-time error '1004': Method 'Open' of object 'Workbooks' failed
    By krish2503 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 08-14-2015, 06:11 AM
  5. [SOLVED] Run-time error 1004 - Method 'Range' of object'_Global' failed
    By onmyway in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-24-2013, 03:33 PM
  6. me too - run-time error '1004' method 'range' of object '_worksheet' failed
    By ASAFSWIS in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-07-2013, 05:14 PM
  7. Method'OpenText' of object 'workbooks' failed
    By jazbath in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-13-2009, 02:41 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1