Handle Error 9 when there is an Empty Array

后端 未结 8 1587
无人共我
无人共我 2021-01-02 17:43

I am writing a script that will loop through an Excel spreadsheet and find if there are duplicates of selected cells. If there are duplicates then the function will return

相关标签:
8条回答
  • 2021-01-02 18:35

    You always can use "isArray()" function

    Dim yourArray as variant
    if not isArray(your_array) then
       msgbox("empty")
    else
       msgbox("with data")
    end if
    
    0 讨论(0)
  • 2021-01-02 18:39

    .. I am still getting error #9 script out of bounds

    if you get error #9....doesn't that mean that you are geting the info that you need (array is empty)?

    0 讨论(0)
提交回复
热议问题