How to check if object is nothing

on of the annoy things i keep runing accross is if a object is set or not…

how can I test if uidoc is set or not?

I’m trying… if (uidoc = “”) but it’s wrong

Nothing doesn’t work either…

sub initialize

Dim s As New NotesSession

Dim db As NotesDatabase

Dim doc As NotesDocument

Dim ws As New NotesUIWorkspace

Dim uidoc As NotesUIDocument

Dim promptResult As Integer

Set uidoc = ws.Currentdocument

If (uidoc = empty) Then

promptResult = ws.Prompt( PROMPT_OK, “Error”, “Cannot be run from a view”)

GoTo done

End If

can anyone help>?

done:

end sub

Subject: It’s all over the help file…

http://bit.ly/UNePBq

You can find that information either if you look at the examples in the online help, or if you look up “Class statement” in the help.

You would also have found that info if you had been looking at code posted in this forum.

If is Nothing

Subject: i did search

I did search in the help - ui, uidoc, session and document classes… Nothing.

I rememebered a isNothing but forgot it is “is nothing”.

Thanks for the reminder