I need to check if an array is empty or not, and for some reason, I'm getting an odd return value of -400877505
. This was working fine with some other day just yesterday.
After declaring the variable, it's referenced in a function, but that function isn't called until later in my script.
Here's the relevant code without that function, which is IsNotInArray
:
Option Explicit
Dim months_array() As Variant
MsgBox (Not months_array)
If ((Not months_array) = -1) Then
MsgBox "init"
ReDim Preserve months_array(1 To 2) As Variant
months_array(1) = month_iter
size_months_array = 2
ElseIf IsNotInArray(month_iter, months_array) Then
MsgBox "second"
End If