Results 1 to 2 of 2

Thread: [RESOLVED] UBound of a multidimensional array

  1. #1

    Thread Starter
    Fanatic Member ZeBula8's Avatar
    Join Date
    Oct 2002
    Posts
    548

    Resolved [RESOLVED] UBound of a multidimensional array

    myArray(sub1,sub2)

    This array is populated during runtime so I have no idea the number of elements.

    I want to loop through with double for..next to retrieve values, but cannot get the ubound of 'sub2'


    - thank you
    Last edited by ZeBula8; Mar 4th, 2006 at 11:44 AM. Reason: resolved

  2. #2
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: UBound of a multidimensional array

    VB Code:
    1. Debug.Print Ubound(myArray, 2)

    Quote Originally Posted by MSDN

    UBound(arrayname[, dimension])

    The UBound function syntax has these parts:

    Part Description
    arrayname - Required. Name of the arrayvariable; follows standard variable naming conventions.
    dimension - Optional; Variant (Long). Whole number indicating which dimension's upper bound is returned. Use 1 for the first dimension, 2 for the second, and so on. If dimension is omitted, 1 is assumed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width