VBScript UCase Function


Advertisements

UCase

The UCase Function returns the string after converting the entered string into UPPER case letters.

Syntax

UCase(String)

Example

<!DOCTYPE html>
<html>
   <body>
      <script language = "vbscript" type = "text/vbscript">
         var = "Microsoft VBScript"
         document.write("Line 1 : " & UCase(var) & "<br />")
         
         var = "MS VBSCRIPT"
         document.write("Line 2 : " & UCase(var) & "<br />")
         
         var = "microsoft"
         document.write("Line 3 : " & UCase(var) & "<br />")
      </script>
   </body>
</html>

When you save it as .html and execute it in Internet Explorer, then the above script will produce the following result −

Line 1 : MICROSOFT VBSCRIPT
Line 2 : MS VBSCRIPT
Line 3 : MICROSOFT
vbscript_strings.htm
Advertisements