Results 1 to 2 of 2

Thread: How do you get the Ubound of a 2 dimensional array?

  1. #1
    Guest

    Exclamation

    I have a 2-dimensional array like this URLForward(1,9) and I want to do something like this like

    Ubound(urlforward)

    But I want the ubound of the second part of the array not the first part or whatever..

    For exampled the array is redimensioned everytime first during runtime and then when the user clicks a button...

    So it will look like this
    URLFORWARD(index,9) = whatever

    or
    URLFORWARD(index,7) = whatever

    index can equal to whatever.. depends on what it was redimensioned to! But I want to be able depending on what the index is get the ubound of the 2nd part of the array. Like if it was URLFORWARD(index,6) the ubound would be 6.

    I have no idea how to do this any help?

  2. #2
    Guest
    Is this what you want?

    Code:
    Dim MyArray(5, 9)
    
    ' Should return 9
    RetVal = UBound(MyArray, 2)
    Form1.Print RetVal

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