|
-
Mar 30th, 2000, 03:54 AM
#1
Thread Starter
transcendental analytic
How do I handle a dynamic array before redim without causing any errors. I have a function that test if it causes Subscript out of range (Error 9) and returns true if it does, but is there any other way?
-
Mar 30th, 2000, 09:40 PM
#2
You can do somwthing like this:
Code:
Private Sub Command1_Click()
Dim arr() As String
Dim intNumber As Integer
On Error Resume Next
intNumber = UBound(arr)
If Err.Number = 9 Then
MsgBox "Array is not dimensioned."
End If
End Sub
-
Mar 30th, 2000, 09:42 PM
#3
Frenzied Member
I just put an error handler in or do what you've done and make a function to test it, I can't see why you need another way round it
-
Mar 31st, 2000, 01:17 AM
#4
Thread Starter
transcendental analytic
No, I knew it! There was no other way to do it. I thought there should be something like Ismissing or Isnull but, no, no way. Thanks four your support Serge, but you have to read more carefully, I have a function for that allready.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|