+ Reply to Thread
Results 1 to 4 of 4

Run-time error '9': Subscript out of range

  1. #1
    Forum Contributor
    Join Date
    01-15-2013
    Location
    London
    MS-Off Ver
    Excel 2003, 2007, 2010, 2019
    Posts
    436

    Run-time error '9': Subscript out of range

    Please help me to find why there is always the error of

    Run-time error '9': Subscript out of range

    For the macro below. It is proved to be working by Jerry Beaucaire, but just do not work in my case. The purpose of the macro is to combine multiple files into a single workbook.
    Please Login or Register  to view this content.
    Last edited by Leith Ross; 08-03-2013 at 10:39 PM. Reason: Added Code Tags

  2. #2
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,523

    Re: Run-time error '9': Subscript out of range

    Hi billj,

    That error message usually means the code cannot find a specific tab that it's being referred to.

    Though you haven't said what line is causing the error I'm guessing it's this one...

    Please Login or Register  to view this content.
    ...which would mean you haven't created a tab called Master in the relevant workbook for the tabs to be imported into. If this is the case, name a tab Master in the desired workbook for the data to be imported into and try again.

    Please also wrap you code with the appropriate tags as I have done.

    Regards,

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  3. #3
    Forum Contributor
    Join Date
    01-15-2013
    Location
    London
    MS-Off Ver
    Excel 2003, 2007, 2010, 2019
    Posts
    436

    Re: Run-time error '9': Subscript out of range

    Hi Trebor76,

    I named a tab in the desired workbook as Master. This removed the error. But nothing appeared in the desired workbook.
    Last edited by Leith Ross; 08-03-2013 at 10:40 PM. Reason: Removed Quote

  4. #4
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,523

    Re: Run-time error '9': Subscript out of range

    Have you changed the fPath variable to point to where your files are actually located?

    Other than that I'm not sure as I haven't written the code. I'm sure Jerry would have tested it thoroughly so I'm sure it's just something minor like the location of the files as I've mentioned.

    Robert

+ 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 9 Subscript out of range
    By vijanand1279 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-28-2012, 03:30 PM
  2. Run Time Error 9 Subscript out of Range
    By Petrolcb41 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-26-2010, 08:43 PM
  3. run time error 9 : subscript out of range
    By baxtercavendish in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 08-28-2009, 11:14 AM
  4. [SOLVED] run time error 9, subscript out of range
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-06-2006, 09:31 PM
  5. Run-time error 9 (Subscript out of range)
    By Lizz45ie in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-26-2005, 07:05 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