+ Reply to Thread
Results 1 to 4 of 4

VBA Error - Run Time Error 9 - Subscript out if range

  1. #1
    Registered User
    Join Date
    11-18-2016
    Location
    Seattle, Washington
    MS-Off Ver
    2013
    Posts
    60

    VBA Error - Run Time Error 9 - Subscript out if range

    Hi,

    I'm getting a Run Time Error 9 - Subscript out if range for the following code:

    Please Login or Register  to view this content.
    Any tips?

    Thank you.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    24,038

    Re: VBA Error - Run Time Error 9 - Subscript out if range

    When you get the error and click on debug, what line of code is highlighted.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    11-18-2016
    Location
    Seattle, Washington
    MS-Off Ver
    2013
    Posts
    60

    Re: VBA Error - Run Time Error 9 - Subscript out if range

    Hi,

    I get the error with the following line:

    Please Login or Register  to view this content.
    Thanks.

  4. #4
    Registered User
    Join Date
    08-08-2014
    Location
    Lancaster, PA
    MS-Off Ver
    2016 (windows & mac)
    Posts
    94

    Re: VBA Error - Run Time Error 9 - Subscript out if range

    Subscript out of Range errors from the Split function usually occur when the delimiter is not found in the text string and you then try and reference an array item that doesn't exist.

    if the delimiter is not found then the Split function produces a string array with a single item, item(0) which contains the original string.

    in this case I would guess your inner Split function does not find "'stats_chart_table_key'>" within .responseText; therefore there is no second item item(1), so when you try and reference that item for the outer Split function it causes an error.

    also worth noting as a general point, the Split function always produces 0-based arrays, irrespective of if you have Option Base 1 set. although I don't think this fact has any bearing on your issue, just thought I'd mention it as useful info to know!
    Last edited by thatandyward; 07-16-2017 at 10:00 PM.

+ 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
    By xyza12 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-30-2015, 03:56 AM
  2. Run-Time error '9' Subscript out of range
    By wahi00 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-29-2014, 09:56 PM
  3. [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
  4. [SOLVED] Run-time error 9 - subscript out of range
    By ScotyB in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-21-2012, 09:46 PM
  5. Run-time error '9': subscript out of range
    By nicko54 in forum Excel General
    Replies: 6
    Last Post: 02-02-2011, 09:08 PM
  6. Run-time Error '9': Subscript out of range
    By tryaz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-23-2009, 02:13 PM
  7. run-time error '9': Subscript out of range
    By AccessHelp in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-30-2005, 01:05 PM

Tags for this Thread

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