Handle Error 9 when there is an Empty Array

后端 未结 8 1653
无人共我
无人共我 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条回答
  •  Happy的楠姐
    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
    

提交回复
热议问题