Results 1 to 4 of 4

Thread: Deleted Arrays which are Out of Scope {RESOLVED}

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jul 2001
    Location
    Tucson, AZ
    Posts
    2,166

    Deleted Arrays which are Out of Scope {RESOLVED}

    I need to erase an array in one procedure then do a check for
    its validity in another. After erasing, the array is out of scope.

    On Error Resume Next should continue past this point BUT I need an If/EndIf condition based upon whether the array exists or NOT.

    Any suggestions appreciated.

    Thanks
    David
    Last edited by dw85745; Sep 29th, 2003 at 08:57 PM.

  2. #2
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429
    Can you use a 'Public' Boolean; bln_Array_Errased.

  3. #3
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431
    VB Code:
    1. Dim Myarray() As String
    2.    
    3.     [b]On Error Resume Next[/b]
    4.     If UBound(Myarray) > 0 Then
    5.         If Err.Number <> 0 Then
    6.             Err.Clear
    7.             MsgBox "Array doesn't exist"
    8.         End If
    9.     End If

  4. #4

    Thread Starter
    PowerPoster
    Join Date
    Jul 2001
    Location
    Tucson, AZ
    Posts
    2,166
    Thanks MartinLiss. Will give it a try and retain for future reference.

    David


    --------------------------------

    After post changed Sub to Function and return a different value when erasing array, then checked for this value in other Sub.
    Works great an No Error check required.

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