ChrW Function [VBA]

Returns the Unicode character that corresponds to the specified character code.

Icona Aviso

Esta función ou constante actívase coa instrución Option VBASupport 1 colocada antes do código de programa executábel dun módulo.


Sintaxe:

ChrW(Expression As Integer)

Valor de retorno:

String

Parámetros:

Expression: Numeric variables that represent a valid 16 bit Unicode value (0-65535). An empty value returns error code 5. A value out of the range [0,65535] returns error code 6.

Códigos de erro

5 Chamada de procedemento incorrecta

6 Desbordamento

Exemplo:

Sub ExampleChrW

 ' This example inserts the greek letter Alpha and Omega in a string.

 MsgBox "From "+ ChrW(913)+" to " + ChrW(937)

 ' The printout appears in the dialog as: From Α to Ω

End Sub