CType Function |
Syntax:
CShort(expr )
Group:
Description:
Converts an expr to the specified objtype type. Conversion include inheritance, implementation and value conversion. If the expr can't be converted, a "type mismatch error" will occur.
Parameters:
Parameter |
Description |
Converts the value of this expression. |
|
Converts to this type. |
Example:
Sub Main
Debug.Print CType(1.1, Integer) ' 1
Dim V As Object
V = Err
Debug.Print TypeName(CType(V, ErrObject)) ' ErrObject
EndSub