"renojim" wrote:
"TheEndless" wrote:
In your If statement, you should be checking Count() on xmlFileCount, not on FileCountString.
If xmlFileCount <> invalid And xmlFileCount.Count() > 0 Then
Someone correct me if I'm wrong, but I believe that statement will crash to the debugger if xmlFileCount is invalid since both parts of the "if" are always evaluated.
-JT
That's not been my experience. In all of my testing, if the first evaluation fails, the second isn't evaluated.
I just tested again, and the following code prints "invalid"..
test = invalid
If test <> invalid And test.Count() > 0 Then
print "test"
Else
print "invalid"
End If