Left and Right functions
Returns a Variant (String) containing a specified number of
characters from the right side of a string.
Syntax : Left(string, length) | Right(string, length)
Example:
dim AnyString, MyStr
AnyString = "Hello World" ' Define string.
MyStr = Right(AnyString, 1) ' Returns "d".
MyStr = Right(AnyString, 6) ' Returns " World".
MyStr = Right(AnyString, 20) ' Returns "Hello World".
Asc functions
Returns an Integer representing the character code
corresponding to the first letter in a string.
Syntax:
Asc(string)
Example:
Dim MyNumber
MyNumber = Asc("A") ' Returns 65.
MyNumber = Asc("a") ' Returns 97.
MyNumber = Asc("Apple") ' Returns 65.
Base 0 & 1
Option Base {0 | 1}.
Because the default base is 0, the Option Base statement is
never required. If used, the statement must appear ina
module before any procedures. Option Base can appear only
once in a module and must precede arraydeclarations that
include dimensions.The Option Base statement only affects
the lower bound of arrays in the module where the statement
is located
Example:
Dim iNumber(15 To 114) As Integer.
Chr Function
Returns a String containing the character associated with
the specified character code.The required charcode argument
is a Long that identifies a character.
Syntax:
Chr(charcode)
Example:
Dim MyChar
MyChar = Chr(65) ' Returns A.
MyChar = Chr(97) ' Returns a.
MyChar = Chr(62) ' Returns >.
MyChar = Chr(37) ' Returns %.
FormatCurrency, FormatPercent, FormatNumber
Syntax:
FormatCurrency(Expression[,NumDigitsAfterDecimal[,IncludeLeadingDigit[,UseParensForNegativeNumbers [,GroupDigits]]]]),
FormatPercent(Expression[,NumDigitsAfterDecimal [,IncludeLeadingDigit
[,UseParensForNegativeNumbers
[,GroupDigits]]]])
FormatNumber(Expression[,NumDigitsAfterDecimal [,IncludeLeadingDigit
[,UseParensForNegativeNumbers [,GroupDigits]]]])
|
Part |
Description |
| Expression |
Required. Expression to be formatted. |
| NumDigitsAfterDecimal |
Optional. Numeric value indicating how many places to
the right of the decimal are displayed. Default
value is –1,which indicates that the computer's
regional settings are used |
| IncludeLeadingDigit |
Optional. Tristate constant that indicates whether or
not a leading zero is displayed for fractional
values. See Settings section for values |
| Use Parents For (-)No |
Optional. Tristate constant that indicates whether or
not place negative values within parentheses. See
Setting section for values. |
|