+ Reply to Thread
Results 1 to 3 of 3

Run-Time error '9' Subscript out of range

  1. #1
    Registered User
    Join Date
    07-29-2014
    Location
    USA
    MS-Off Ver
    2010
    Posts
    1

    Run-Time error '9' Subscript out of range

    Hello,

    I get a run time error when I run the macro below at the point where it says windows(TFile). Activate. The macro starts with looking in the server and pulling in the updated files. Then it opens up one of the updated file to copy into the current file and that is where the error occurs. What am I doint wrong? Any suggestions? I would appreciate it.



    Thanks
    Dee

    Please Login or Register  to view this content.
    Last edited by Paul; 07-29-2014 at 05:03 PM. Reason: Added CODE tags for new user. Please do so yourself in the future. (See Forum Rules)

  2. #2
    Forum Contributor
    Join Date
    03-12-2013
    Location
    Chicago, USA
    MS-Off Ver
    Excel 2007
    Posts
    230

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

    I assume "TFile" is the name of the current workbook? First, check the file name ("RR Upload.GA006.ULV.xxx.GA.SA BOLI.xlsm") and ensure this is 100% accurate. If it is accurate, then maybe try moving the IBook.Close line before the Windows(TFile).Activate line and delete this aforementioned activate line. If you close the IFile workbook, only the current workbook will be open anyway.

  3. #3
    Forum Contributor pareshj's Avatar
    Join Date
    05-20-2014
    Location
    MUMBAI
    MS-Off Ver
    2007 & 2010
    Posts
    447

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

    Hi,

    Try the following code instead of Windows("xxxxx").Activate

    Please Login or Register  to view this content.
    Where,
    SheetName = Sheet you want to activate.

    Similarly do it for Windows(TFile).


    Regards,
    Paresh J
    Click on "* Add Reputation" as a way to say thanks

+ 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. [SOLVED] Run-time error '9': subscript out of range - error occurs on multiple computers except one
    By BrettE in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-06-2014, 11:19 PM
  2. [SOLVED] Run-time Error '9': Subscript out of Range
    By Veena Anoohya in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-19-2014, 05:06 AM
  3. Run time error 9 - subscript out of range
    By lukestkd in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-09-2012, 08:06 PM
  4. [SOLVED] Run Time Error 9 - Subscript out of range
    By kushmakarsharma in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-25-2012, 08:02 AM
  5. 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

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