Constants are named storage locations in memory, the value of which does not change during program Execution. They remain the same throughout the program execution. When the user wants to use a value that never changes, a constant can be declared and created. The Const statement is used to create a constant. Constants can be declared in local, form, module or global scope and can be public or private as for variables. Constants can be declared as illustrated below.
Public Const gravityconstant As Single = 9.81
The predefined constants can be used anywhere in the code in place of the actual numeric values. This makes the code easier to read and write.
For example consider a statement that will set the window state of a form to be maximized.
Form1.Windowstate = 2
The same task can be performed using a Visual Basic constant
Form1.WindowState = vbMaximized
Many built-in functions are offered by Visual Basic fall under various categories. These functions are procedures that return a value. The functions fall into the following basic categories that will be discussed in the follwing sections at length.

Categories
Tag Cloud
Blog RSS
Comments RSS
Last 50 Posts
Back
Back
Back
Void « Default
Life
Earth
Wind
Water
Fire
Light 