我需要检查数组是否为空,并且由于某种原因,我得到了一个奇数的返回值-400877505
。就在昨天的另一天,这很好。
在声明变量后,在函数中对其进行了引用,但是直到我的脚本稍后才调用该函数。
以下是不带该功能的相关代码,即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