The sample I posted really is the best way to do it. Don't worry about error checking. Just do this:
Code:
Dim bCreated as Boolean
On Error Resume Next
'See if the array has been created...
MyArray(0) = MyArray(0)
bCreated = (Err = 0)
If Not bCreated Then
'...and if it hasn't then dimension it
Err.Clear
Redim MyArray(5)
End If
' This turns off error checking and so the rest of
' the sub will behave just like it always did
'On Error Goto 0
' The rest of your code
End Sub
[Edited by MartinLiss on 04-13-2000 at 07:46 AM]