+ Reply to Thread
Results 1 to 3 of 3

Runtime error '9'. Subscripts out of range - Dynamic array

  1. #1
    Registered User
    Join Date
    08-20-2007
    Posts
    60

    Runtime error '9'. Subscripts out of range - Dynamic array

    Hello,

    I have defined a dynamic array called Steps(). I am trying to store the value of a cell in it. But I am getting the error: Runtime error '9'. Subscripts out of range. Not sure what's wrong?


    Please Login or Register  to view this content.

    Thanks in Advance.. Anil

  2. #2
    Registered User
    Join Date
    08-20-2007
    Posts
    60
    Thanks for looking into it - I figured it out. Had to redim with preserve..

    Please Login or Register  to view this content.
    Thanks, Anil

  3. #3
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    You could also use

    Please Login or Register  to view this content.
    Note:- the array starts at 1

    Here are 2 others ways to fill an array from a sheet without looping through the cells

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

+ 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