Tuesday, October 8, 2013

VBA String Functions - Part 4

STRCONV Function (VBA)

In Microsoft Excel, the STRCONV function returns a string converted as specified.


The syntax for the STRCONV function is:

StrConv ( text, conversion, [LCID] )
text is the string that you wish to convert.

LCID is optional. If this parameter is omitted, the STRCONV function assumes the system LocaleID.

VBA Function Example

The STRCONV function can only be used in VBA code in Microsoft Excel. Here are some examples of what the STRCONV function would return:

StrConv("vbaexpress.blogspot.in", 1) would return "VBAEXPRESS.BLOGSPOT.IN"
StrConv("VBAEXPRESS.BLOGSPOT.IN", 2) would return "vbaexpress.blogspot.in"
StrConv("vbaexpress.blogspot.in", 3) would return "Vbaexpress.Blogspot.In"

Dim sResult As String
sResult = StrConv("VBAEXPRESS.BLOGSPOT.IN", vbProperCase)

In this example, the variable called sResult would now contain the value "Vbaexpress.Blogspot.In".

No comments:

Post a Comment

Excel Anatomy Part04 - Home and Insert Ribbons

Home and Insert Ribbons Home Ribbon Home tab contains the most frequently used options such as cut-copy-paste, font formatting, alignme...