Professional Documents
Culture Documents
Function: Len(string)
Function: LCase$(string)
Description: Returns a Long specifying the position of one string within another. The search
starts either at the first character position or at the position specified by the
start argument.
Examples: lngPos = Instr("Visual Basic", "a") ' lngPos = 5
Microsoft Visual Basic Shortcut Keys and Built-in Function
lngPos = Instr(6, "Visual Basic", "a") ' lngPos = 9 (starting at position 6)
lngPos = Instr("Visual Basic", "A") ' lngPos = 0 (case-sensitive search)
Description: Returns a string containing a repeating character string of the length specified.
Examples: strTest = String(5, "a") ' strTest = "aaaaa"
strTest = String(5, 97) ' strTest = "aaaaa" (97 is the ASCII code for "a")
Function: Space(number)
Description: Returns a string in which a specified substring has been replaced with another
substring a specified number of times.
Function: StrReverse(string)
Description: Returns a string in which the character order of a specified string is reversed.
Function: Asc(string)
Description: Returns an Integer representing the ASCII character code corresponding to the
first letter in a string.
Examples: intCode = Asc("*") ' intCode = 42
intCode = Asc("ABC") ' intCode = 65
Function: Chr$(charcode)
Description: Returns a string containing the character associated with the specified character
code.
Microsoft Visual Basic Shortcut Keys and Built-in Function
Examples: strChar = Chr$(65) ' strChar = "A"
vbQuestion 32
vbExclamation 48
vbInformation 64