+ Reply to Thread
Results 1 to 5 of 5

Select Sheets based on variable array -ERROR 9 Subscript out of range

  1. #1
    Registered User
    Join Date
    09-10-2012
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2010
    Posts
    4

    Select Sheets based on variable array -ERROR 9 Subscript out of range

    Hi, I've tried a few forums and can't quite understand why I'm getting an error with the following code:

    I'm attempting to select certain charts, based on a list of names entered between rows 9 and 35 on a worksheet (in this case 1,2,4,7,11,12 have been selected. If I use the actual names of the sheets as in the unused line of code, it works fine. Is there an easy way to fix this, I wonder?


    Please Login or Register  to view this content.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Select Sheets based on variable array -ERROR 9 Subscript out of range

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    09-10-2012
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Select Sheets based on variable array -ERROR 9 Subscript out of range

    Thanks Andy, but I still get the same error message on the charts(split(... line of code. Any ideas

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Select Sheets based on variable array -ERROR 9 Subscript out of range

    it worked for me on a test file.

    can you post example workbook to illustrate the problem

  5. #5
    Registered User
    Join Date
    09-10-2012
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Select Sheets based on variable array -ERROR 9 Subscript out of range

    Thanks again Andy, while sanitising my rather large spreadsheet to send through, the code suddenly worked. Found that I had referenced one of the charts on my list incorrectly. Now resolved

+ 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