Tuesday, October 8, 2013

VBA String Functions - Part 4

STRCONV Function (VBA)

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

Syntax

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

Data base function

Database function Daverage function      Averages the values in a field (column) of records in a list or database that match conditio...