+ Reply to Thread
Results 1 to 2 of 2

Debugging -- Two instances of Error 1004

  1. #1
    Registered User
    Join Date
    05-27-2013
    Location
    Middle, Nowhere
    MS-Off Ver
    Excel 2003
    Posts
    13

    Debugging -- Two instances of Error 1004

    I keep getting Run-time Error 1004 application-defined or object-defined error for the lines highlighted in green and "run-time error '1004' Excel cannot find the text file to refresh this external data range. etcetc" highlighted in red. The thing is, that line of code came from when I was recording a macro and I have no idea how to modify it. I know the code is really clunky, but this is the best i'm able to come up with haha, suggestions are appreciated. Basically what I am trying to do is pull out data from the same table found in multiple documents and put it in an excel file. Can't seem to do that directly with word so I have batch converted the word docs into text files and am now importing the text files into excel so its easier to extract data from the cells.

    Please Login or Register  to view this content.
    Last edited by xxgirlinbluexx; 06-25-2013 at 11:51 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Debugging -- Two instances of Error 1004

    The syntax is wrong for your range

    Change
    Set rngFileNames = Sheets("Sheet1").Range("I2", Cells(Rows.Count, "I").End(xlUp))
    To
    Set rngFileNames = Sheets("Sheet1").Range("I2:I" & Cells(Rows.Count, "I").End(xlUp))
    Elegant Simplicity............. Not Always

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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