AscW funktsioon [VBA]

Returns the Unicode value of the first character in a string expression.

warning

This constant, function or object is enabled with the statement Option VBASupport 1 placed before the executable program code in a module.


SĂĽntaks:


AscW (Text As String)

Tagastusväärtus:

Täisarv

Parameetrid:

Text: Suvaline kehtiv stringavaldis. Oluline on ainult stringi esimene märk.

Use the AscW function to replace keys with Unicode values. If the AscW function encounters a blank string, LibreOffice Basic reports a run-time error. Returned values are between 0 and 65535.

Veakoodid:

5 Vigane protseduuri väljakutse

Näide:


Sub ExampleAscW
 Print AscW("A") ' returns 65
 Print AscW("Ω") ' returns 937
 Print AscW("Αθήνα") ' returns 913, since only the first character (Alpha) is taken into account
End Sub

Palun toeta meid!