Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to determine if var = nothing
Message
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00413401
Message ID:
00414643
Views:
24
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!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform