UCase, UCase$ Functions

Named Arguments

No

Syntax

UCase(string)

string

Use: Required

Data Type: String

A valid string expression.

Return Value

A String or Variant of subtype String.

Description

Converts a string to uppercase.

Rules at a Glance

  • UCase affects only lowercase alphabetical letters; all other characters within string remain unaffected.

  • UCase returns Null if string contains a Null.

Programming Tips and Gotchas

As with all string functions in which two variations are available (one suffixed with the $ sign and one without), the $ version returns a String data type; the plain version returns a variant of subtype string.

See Also

LCase Function

Get VB & VBA in a Nutshell: The Language now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.