+ Reply to Thread
Results 1 to 6 of 6

Macro - Subscript out of range error

  1. #1
    Registered User
    Join Date
    01-02-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2007
    Posts
    3

    Macro - Subscript out of range error

    Hi,

    I have a template of records in a spreadsheet (Time tracker automation) which has to be copied and pasted on a daily basis to another spreadsheet (Time Tracker Jan'12). I use the scheduled tasks to open the spreadsheets and run the macro.
    During testing the macro had performed well and everything came fine but after mulitple use of the macro this error came up. "Run time error 9 Subscript out of range error '

    I am new to excel macro and created a basic one which doesnt imply all rules. please suggest on a better macro scripting with rules if possible

    Code-
    Please Login or Register  to view this content.
    Regards,
    Hari
    Last edited by arlu1201; 01-24-2013 at 07:26 AM. Reason: Use code tags as per forum rules.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Macro - Subscript out of range error

    Your code can be written like this -
    Please Login or Register  to view this content.
    You are getting the error because the file extension is missing.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    01-02-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Macro - Subscript out of range error

    Thanks Arlu, your code works fine. i used the extenstion in my code for some reason it showed the same error.

    i feel i was beating around the bush after seeing your simple code

    Thanks a lot!

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Macro - Subscript out of range error

    Are you still getting the error?

  5. #5
    Registered User
    Join Date
    01-02-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Macro - Subscript out of range error

    Not anymore thanks!

  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Macro - Subscript out of range error

    Ok great.

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.

  7. #7
    Registered User
    Join Date
    01-02-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Macro - Subscript out of range error

    Information noted Arlette. thank you!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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