VB Language

The following Visual Basic commands have been tested with IDEA v9 and appear to be functioning properly. I have added some examples where possible on their use.

Abs()

Returns the absolute value of a specified number.

Asc()

The Asc() function will return the ASCII code for the character.  It a string is placed in the function it will only return the ASCII code for the first character.

Atn()

Calculates the value containing the angle whose tangent is the specified number.  The result is a double type.  The example below calculates pi.

Boolean

A Boolean variable can hold a True/False value. Boolean variables (and properties) are used frequently in VBA programming to hold data that can be on/off, yes/no, and so on. When you declare a Boolean variable, it is automatically initialized to False.

Byte

Name: Byte

Type: Integer - Numbers with no fractional part

Range: 0 to 255

Cbool()

Converst an expression into a boolean.  So if the expression is true, i.e. 5 = 5 then it would return True, if it is false, i.e. 5 = 6 then it would return false.

CDate()

This function converst a valid date or time expression that is currently a string into a date type.  The expression can contain only the date, only the time or both.

CDbl()

This conversion will change a number into a number of type double.

CInt()

Converts a numeric expression into one of an integer data type.  In the example below when we changed a double into an integer the fractional portion is rounded.

CLng()

This functions changes a number into a long type.

Pages