MrKevorkian
asked on
how check if an object is set to an instance
hello
i keep getting object not set to an instance
when i check if an object (MyObject.OrganisationDeta ils.Contac tDetails.T elephones( 0)) exists:
i tried:
If Not IsDBNull(MyObject.Organisa tionDetail s.ContactD etails.Tel ephones(0) ) Then
If Not (MyObject.OrganisationDeta ils.Contac tDetails.T elephones( 0)) is nothing Then
but both return that same error.
how do i check an object that may not exist - to see if it does exist
i keep getting object not set to an instance
when i check if an object (MyObject.OrganisationDeta
i tried:
If Not IsDBNull(MyObject.Organisa
If Not (MyObject.OrganisationDeta
but both return that same error.
how do i check an object that may not exist - to see if it does exist
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
public function HasTelephoneNumber as boolean
Try
if MyObject.OrganisationDetai
Return True
end if
Catch ex As NullReferenceException
return False
End Try
end function
KGreg
ASKER