Re: testing whether an object exists
From: Gale Green (gale_at_databeat.fsnet.co.uk)
Date: 05/24/04
- Next message: Martin: "Re: Returning an xml string from msxml.domdocument"
- Previous message: Bob Butler: "Re: testing whether an object exists"
- In reply to: Peter: "testing whether an object exists"
- Next in thread: Peter: "Re: testing whether an object exists"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 24 May 2004 17:21:51 +0100
On Mon, 24 May 2004 18:17:07 +0200, "Peter" <-> wrote:
>Hi
>
>I thought that I can do the following to test whether an object still
>exists:
>if myopject<>Nothing then...
>But VB gives me an error on this.
>Do I need to make error trapping to test whether an object exists or are
>there other ways???
If MyObject Is Nothing Then
or
If Not (MyObject Is Nothing) Then
The parentheses are optional but I always use them when I use "Not".
Gale.
- Next message: Martin: "Re: Returning an xml string from msxml.domdocument"
- Previous message: Bob Butler: "Re: testing whether an object exists"
- In reply to: Peter: "testing whether an object exists"
- Next in thread: Peter: "Re: testing whether an object exists"
- Messages sorted by: [ date ] [ thread ]