VBA Asc Function: The Asc function in VBA returns an integer showing the character code for the first character of a given string.

Syntax

Parameter

String (required) – This parameter represents the text string for which you want to calculate the character code of the first character.

Return

This function returns an integer representing the character code for the first character of the specified string.

Example 1

Output

98

VBA Asc Function

Example 2

Output

98

VBA Asc Function

Example 3

Output

66

VBA Asc Function

Pin It on Pinterest

Share This