# CharUpper Function

`Declare Function CharUpper Lib "user32.dll" Alias "CharUpperA" (ByVal lpsz As String) As String`

CharUpper converts all of the lower-case letters in a string into upper-case. While many programming languages have intrinsic functions to do this, Windows provides this API for languages that may not. The converted string is returned.

lpsz
  The string to convert to upper-case.

Example:

    ' Convert "Hello, World!" to upper-case
    Debug.Print CharUpper("Hello, World!")
    ' value returned is "HELLO, WORLD!"

Related Call: CharLower
Category: Strings
Back to the index.