Results 1 to 10 of 10

Thread: VB Snippet - Determine if Array is Empty

Threaded View

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441

    VB Snippet - Determine if Array is Empty

    VB Code:
    1. Private Function isArrayEmpty(arr as Variant) As Boolean
    2.  
    3.  Dim dblCount As Double
    4.  
    5.  isArrayEmpty = True
    6.  
    7.  On Error Resume Next
    8.  
    9. ' CAUSES AN ERROR IF EMPTY
    10.  
    11.  dblCount = Ubound(arr)
    12.  
    13.  If Err.Number > 0 Then Exit Function
    14.  
    15.  isArrayEmpty = False
    16.  
    17. End Function
    Last edited by James Stanich; Feb 20th, 2003 at 11:11 PM.
    Remaining quiet down here !!!

    BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width