VBScript Asc Function
Complete VBScript Reference Manual
The Asc function converts the first letter in a string to its corresponding ANSI code and returns the result.
Syntax
Asc(string)
| Parameters | Description |
|---|---|
| string | Required. A string expression. It cannot be an empty string! |
Example
Example 1
The example above produces the following output:
65
97
70
102
50
35
Try it »
Example 2
Asc returns the ANSI code of the first character in a string:
The example above produces the following output:
111
114
Try it »
Example 3
How to return the ANSI codes of all characters in a string:
The example above produces the following output:
114
117
110
111
111
98
46
99
111
109
Try it »
Complete VBScript Reference Manual