Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1

    Smile Unanswered: Opposite of Is Nothing

    To check whether an object was set or not I use
    PHP Code:
      If qdf Is Nothing Then  ' Object qdf was not 
         ......
         .......
      End If 
    But how can you make the opposite. I tried
    PHP Code:
      If qdf Is NOT Nothing Then  ' Object qdf was set 
         Set qdf = Nothing
       End If 
    But gives an error

    I know you can do it like that
    PHP Code:
       If qdf Is Nothing Then  ' Object qdf was not set
       Else
         Set qdf = Nothing         '  
    reset it
       End 
    If 
    Thanks

  2. #2
    Join Date
    Jan 2004
    Location
    Islamabad, Pakistan
    Posts
    97
    Try negate the whole expression by putting Not before to get the opposite

    as

    If not (qdf Is Nothing) Then ' Object qdf was not
    ......
    .......
    End If


    - Saqib

  3. #3
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Correct thank you.

Posting Permissions

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