TryCast Function |
Syntax:
TryCast(expr,objtype)
Group:
Description: Returns expr's type is related to objtype type. If it is not, nothing will be returned.
Parameters:
Parameter |
Description |
Cast the value of this expression. |
|
Cast to this type. |
Example:
V = Err
Debug.Print TypeName(TryCast(V, ErrObject)) ' ErrObjectEndSub
See Also: