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
Try this to check an empty array:
Dim arr() As String If (Not arr) = -1 Then Debug.Print "empty" Else Debug.Print "UBound is " & UBound(X) End If
HTH!