+ Reply to Thread
Results 1 to 2 of 2

Problem at saving sencond file in a loop "Run time error '9'"

  1. #1
    Registered User
    Join Date
    05-19-2016
    Location
    aefd
    MS-Off Ver
    afdaf
    Posts
    1

    Problem at saving sencond file in a loop "Run time error '9'"

    'Hello,

    i have written the following code, it opens all the files (100) of a folder and copys the worksheet on a given one

    but when it is going to save the second file it gives me:

    Run time error '9', subscript out of range.

    can you help me?

    Please Login or Register  to view this content.
    thank you

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Problem at saving sencond file in a loop "Run time error '9'"

    What about using with statement?

    Please Login or Register  to view this content.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

+ 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. Replies: 1
    Last Post: 10-24-2014, 12:32 AM
  2. [SOLVED] Ping Status Sheet: "Run-time error '94': Invalid use of null" problem - Excel 2010 VBA
    By mdwbeex in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-13-2014, 11:57 AM
  3. [SOLVED] Problem with "Type Mismatch" Run-time error 13
    By dannyjoer in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-26-2013, 09:39 AM
  4. Excel 2010 (Run-time error '13' type mismatch) "Debug" and "Continue" Grayed out.
    By Jeronimo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-18-2012, 06:42 PM
  5. Replies: 4
    Last Post: 12-30-2011, 11:24 AM
  6. Array loop producing error "Run time error '1004'"
    By jeskit in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 05-06-2011, 08:56 AM
  7. Basic "run-time error 1004" problem
    By hoyyqs012 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-31-2009, 12:07 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