STRCONV Function (VBA)

Posted: May 7, 2013 by Theodoulus in VBA
Tags: , , ,

We all encounter situations when we need to convert a string to different formats like Upper Case, Lower Case, Proper Case, Unicode etc. Here we can use STRCONV() function.

The Syntax for STRCONV() is:               STRCONV(text, Conversion, LCID)  

Parameters Description –
     Text : String that you want to convert.
     Conversion : Format type

  1. vbUpperCase : To convert a string to Upper Case
  2. vbLowerCase : To convert a string to Lower case
  3. vbProperCase : To convert a string to Proper Case
  4. vbUnicode : To convert a string to Unicode
  5. vbFromUnicode: To convert a string from unicode value of the string to the default code page of the system

LCID is optional. If this parameter is omitted, the STRCONV function assumes the system LocaleID. (For more information on Locale ID  click here)


StrConv("theodoulus at useful gyaan",vbLowerCase,1)

would return “theodoulus at useful gyaan”

StrConv("theodoulus at useful gyaan",vbUpperCase,1)


StrConv("theodoulus at useful gyaan",vbUnicode,1)

would return”t h e o d o u l u s a t u s e f u l g y a a n ”

StrConv("theodoulus at useful gyaan",vbFromUnicode,1)

would return”??????4??????”

StrConv("theodoulus at useful gyaan",vbProperCase,1)

would return”Theodoulus At Useful Gyaan”



Share your thoughts/feedback

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s