A.19. String Manipulation

Asc Function

Returns a variant number representing the ANSI character of the first character of a string

AscB Function

Returns the value of the first byte in a string

AscW Function

Returns the native character code of the first character in a string (Unicode or ANSI)

Chr Function

Returns a variant string containing the character associated with the specified character code

Chr$ Function

Returns a string containing the character associated with the specified character code

ChrB Function

Returns a variant string containing the specified single byte

ChrB$ Function

Returns a string containing the specified single byte

ChrW Function

Returns a variant string containing the specified native character (Unicode or ANSI)

ChrW$ Function

Returns a string containing the specified native character (Unicode or ANSI)

Filter Function

Returns an array of strings matching (or not) a specified value[4]

[4] VB6 only

Format Function

Returns a variant string formatted to a given specification

Format$ Function

Returns a string formatted to a given specification

FormatCurrency Function

Returns a string variant formatted using the currency settings for the current locale

FormatDateTime Function

Returns a string variant formatted using the date settings for the current locale

FormatNumber Function

Returns a numeric variant formatted to a specified format

FormatPercent Function

Returns a numeric variant formatted using the "%" symbol

InStr Function ...

Get VB & VBA in a Nutshell: The Language now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.