Results 1 to 16 of 16

Thread: [RESOLVED]UBound giving subscript out of range

Threaded View

  1. #6
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: UBound giving subscript out of range

    Code:
    Private Sub Form_Load()
    
    Dim a() As String
    
    If Not a Then Debug.Print "A is not initialized"
    
    ReDim a(1, 1)
    
    If Not a Then Debug.Print "A is still not initialized - since NOT A does not check for that!"
    
    End Sub
    [edit] - please note that VBasicGirl's example does in fact work.
    Last edited by szlamany; Feb 20th, 2005 at 11:21 AM.

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

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