BobSamonik
asked on
Assigning null to an Object
How to assign NULL value to an Object?
ASKER
I can't test it on Nothing and if I assign Nothing
IsNull(MyObject) returns false
IsNull(MyObject) returns false
ASKER
I can't test it on Nothing and if I assign Nothing
IsNull(MyObject) returns false
IsNull(MyObject) returns false
From MSDN:
IsNull Function Example
This example uses the IsNull function to determine if a variable contains a Null.
Dim MyVar, MyCheck
MyCheck = IsNull(MyVar) ' Returns False.
MyVar = ""
MyCheck = IsNull(MyVar) ' Returns False.
MyVar = Null
MyCheck = IsNull(MyVar) ' Returns True.
--Niraj
IsNull Function Example
This example uses the IsNull function to determine if a variable contains a Null.
Dim MyVar, MyCheck
MyCheck = IsNull(MyVar) ' Returns False.
MyVar = ""
MyCheck = IsNull(MyVar) ' Returns False.
MyVar = Null
MyCheck = IsNull(MyVar) ' Returns True.
--Niraj
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
MyCheck has to be declared as an Object becouse I use its methods later
And if a declare it as an object I can't assign Null to it or i don't know how.
And if a declare it as an object I can't assign Null to it or i don't know how.
ASKER
hey
that could help
just a sec svd2002
that could help
just a sec svd2002
ASKER
thats what I needed svd2002
I tried with IsNothing but there is no function like that , then I treid
if MyObject=Nothing ... but that did not work eather
thanks everybody
I tried with IsNothing but there is no function like that , then I treid
if MyObject=Nothing ... but that did not work eather
thanks everybody
ASKER
thats what I needed svd2002
I tried with IsNothing but there is no function like that , then I treid
if MyObject=Nothing ... but that did not work eather
thanks everybody
I tried with IsNothing but there is no function like that , then I treid
if MyObject=Nothing ... but that did not work eather
thanks everybody
Is it?
--Niraj