Académique Documents
Professionnel Documents
Culture Documents
Syntax They must begin with a letter. They can't contain embedded periods or type-declaration characters (special characters that specify a data type). They can be no longer than 255 characters. The names of controls forms classes and modules must not exceed !" characters. They can't be the same as restricted #eywords (e.g. $f %bs or &').
Constant
Syntax for declaring a constant is( )Public|Private Const constantname )!s type* + expression ,xamples( Const conPi " #$%&%'()*'#'+(,( Public Const con-axPlanets !s .nteger " ( -ariables are a storage location and allow us to store data and retrie.e it. -ariables in -/ start with the Dim #eyword.
Syntax for 0efining -ariable 1ame and Type Dim variablename )!s type* ,x ( 0im numberofStudent %s integer
,mbedded 2omments The comment symbol for the .isual /asic is the Single /uote 012$
,x(
Sub Procedures The syntax for the sub procedures is4 )5ri.ate65ublic*)Static*Sub procedurename(arguments) statements ,nd Sub
3unction Procedures The syntax for the 7unction procedures is4 4Private|Public 4Static 3unction procedurename(arguments))!s type* statements 5nd 3unction
Data Types