test string array

kirkm

Registered User.
Local time
Today, 21:41
Joined
Oct 30, 2008
Messages
1,257
Dim Test() as string


How can I test "test" ? I've tried IsNull, IsEmpty, Ubound, and = Nothing but they all return an error, or False when it should be True (i e. when never used)



Thanks
 
Can you show your code? In particular how you are populating your array?
 
It's as on line 1. That's all there is. I'm trying to test it at that point.
 
Dim Test() as string


How can I test "test" ? I've tried IsNull, IsEmpty, Ubound, and = Nothing but they all return an error, or False when it should be True (i e. when never used)



Thanks

Hi. Can’t test this right now but what do you get with this?

If Not ArrayName = -1 Then
 
I get a type Mismatch on the = char.
 
When I use Arrays, the expected results are static. In other words I KNOW what the UBound is supposed to be and I know characteristics that each element should be i.e. length, text, number etc. It is those characteristics that I test and then react accordingly.

When I use them in a loop, I make sure to “flush” them completely ReDim() them at the start of the loop, otherwise they will hold the information from the prior round...
 
I am using them in a Class module and as Set to New instance each time, I assume all will be empty.
 
I see that your original link already references Chip's site.
 

Users who are viewing this thread

Back
Top Bottom