+ Reply to Thread
Results 1 to 4 of 4

How to display contents of a horizontal array

  1. #1
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    How to display contents of a horizontal array

    I have this horizontal array:


    Please Login or Register  to view this content.
    The problem is that i cant use code like this

    For x = 1 to Ubound(month_array1)



    because the ubound of month_array1 is "1". Dont know why but it is. There are 13 elements in the array but ubound is 1.


    I need a way of scrolling through the contents of the array.........any ideas?

  2. #2
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: How to display contents of a horizontal array

    Ranges are always 2D arrays - in this case you need to iterate columns not rows:
    Please Login or Register  to view this content.
    Remember what the dormouse said
    Feed your head

  3. #3
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    Re: How to display contents of a horizontal array

    Great! But now the question is ............why does this work?

    Why is ubound(month_array1,1) = 1
    Why is ubound(month_array1,2) = 13

  4. #4
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: How to display contents of a horizontal array

    Because it's a 2D array. Dimension 1 is rows, dimension 2 is columns.

+ 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