+ Reply to Thread
Results 1 to 6 of 6

(solved)Subscript out of range

  1. #1
    Registered User
    Join Date
    08-17-2011
    Location
    Denmark
    MS-Off Ver
    Excel 2010
    Posts
    8

    (solved)Subscript out of range

    Hi

    I get an error when i try to run this script/macro
    Please Login or Register  to view this content.
    when i debug it marks the line that starts with For each
    i checked to make sure the filename was spelled correct
    Anything ive forgotten?

    Solved: Error is caused by file not found
    Last edited by Genzo; 08-17-2011 at 08:40 AM. Reason: solved

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Subscript out of range

    Sounds as if there is no workbook with that name or no such worksheet. Check the worksheet name doesn't have a space at the end.

  3. #3
    Registered User
    Join Date
    08-17-2011
    Location
    Denmark
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Subscript out of range

    no spaces in worksheet name

  4. #4
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Subscript out of range

    Please, add code tags to your code (see the forum rules)

    Please Login or Register  to view this content.
    Last edited by snb; 08-17-2011 at 05:52 AM.



  5. #5
    Registered User
    Join Date
    08-17-2011
    Location
    Denmark
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Subscript out of range

    it seems to work when i have the worksheets open

    Im gonna cry if thats the problem

  6. #6
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Subscript out of range

    Quote Originally Posted by Genzo View Post
    it seems to work when i have the worksheets open

    Im gonna cry if thats the problem
    Worksheets or workbook?

+ 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