Data Type Characters
Also known as Data Type Suffixes, Type Declaration Characters or Variable Declaration Characters.
This is not used so much know but does work and it saves space.
It is also possible to tell VBA the type of a variable by appending a special character to the end of the variable name.
Type Declaration Characters
VBA does allow you to append a character to a variable's name as a quick way of indicating its data type.
This method of declaring variables should not be used and is only available for backwards compatibility purposes.
The following line will declare a variable with a Double data type
This line however should be declared using the "As" keyword.
Variable Declaration Characters
When you declare a literal constant or when you are performing a calculation you may want a specific data type to be used.
When you use the Variant data type the compiler is able to determine the correct data type for a numerical literal.
However there might be times when the default data type is different to the desired one.
Example
© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited TopPrevNext