AscW Function

Innhold
Innholdsliste 🔎︎

# AscW Function [VBA]

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

Denne konstanten, funksjonen eller objektet er aktivert med utsagnet Option VBASupport 1 plassert før den kjørbare programkoden i en modul.

### Syntaks:

    AscW (string) As Long

### Returverdi:

Long

### Parametre:

string: Any valid string expression. Only the first character in the string is relevant.

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.

### Feilkoder

5 Ugyldig prosedyreoppkall

### Eksempel:

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

Lignende emner

Asc Function (BASIC)

Chr Function

ChrW Function [VBA]