Results 1 to 10 of 10

Thread: Redim Multidimensional arrays

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2005
    Location
    Minnesota
    Posts
    6

    Redim Multidimensional arrays

    OK this just won't work.
    VB Code:
    1. Public Function Find_Frac(attArr() As Variant, c As Integer)
    2.   Dim slashpos
    3.   Dim temphouse
    4.   Dim slashExist As Boolean
    5.   Dim ai
    6.   Dim shouse
    7.   Dim addFrac
    8.   ReDim Preserve attArr(1, UBound(attArr(), 2) + 1)
    9.   temphouse = attArr(1, c)
    10.   If InStr(temphouse, "/") Then
    11.     slashpos = InStr(temphouse, "/")
    12.     shouse = Left(temphouse, slashpos - 3)
    13.     attArr(1, c) = shouse
    14.     addFrac = Mid(temphouse, slashpos - 1)
    15.     attArr(0, ai) = "FRAC"
    16.     attArr(1, ai) = addFrac
    17.   End If
    18. End Function

    When I try to redim attArr() is says it is out of range.
    Is this because the array was passed to it?







    Edit: Added [vbcode][/vbcode] tags for clarity. - Hack
    Last edited by Hack; Oct 28th, 2005 at 07:36 AM.

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