Purpose
Declares a user defined type.
User-defined data types help organize data by making it possible to combine several related variables into a single data structure.
If a user-defined type is defined in the Declarations section of a code module, the type will be visible to the entire application and will remain for the lifetime of the application. If defined in a procedure, the type is only visible to the procedure and will remain only for the lifetime of the procedure.
Syntax
Type TypeName
VarName As DataType
[VarName As DataType...]
End Type
Example
Type CustType 'defined in Declarations
First as String
Last as String
SSNum as String *9 'where *9 is a limit to the variable
CustomerID as Integer
End Type
|