Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to determine if var = nothing
Message
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00413401
Message ID:
00414643
Vues:
22
Hi Eric,

Just tried and I am still getting an error. Compile Error: Variable undefined. And the IDE highlights the AcadCircle after the Is. Here is the code.
General Section:
Private MarkObject As AcadCircle

Public Sub UnMark()
    If MarkObject Is AcadCircle Then
        MarkObject.Delete
        Set MarkObject = Nothing
    End If
End Sub
>I see one problem with it, if MarkObject is not an object of the AcadCircle, it will not be able to find the Delete method! Maybe you just forget to delete the Not?
>
>Private Sub Class_Terminate()
> ' If the MarkObject is still here delete it.
> If MarkObject Is AcadCircle Then
> MarkObject.Delete
> Set MarkObject = Nothing
> End If
>End Sub
Roi
'MCP' Visual FoxPro

In Rome, there was a poem.
About a dog, who found two bone.
He lick the one, he lick the other.
He went pyscho, he drop dead!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform