OK this just won't work.VB Code:
Public Function Find_Frac(attArr() As Variant, c As Integer) Dim slashpos Dim temphouse Dim slashExist As Boolean Dim ai Dim shouse Dim addFrac ReDim Preserve attArr(1, UBound(attArr(), 2) + 1) temphouse = attArr(1, c) If InStr(temphouse, "/") Then slashpos = InStr(temphouse, "/") shouse = Left(temphouse, slashpos - 3) attArr(1, c) = shouse addFrac = Mid(temphouse, slashpos - 1) attArr(0, ai) = "FRAC" attArr(1, ai) = addFrac End If 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




Reply With Quote