STRCONV(string, conversion [,LCID])

Returns the text string converted to a specific case or type (String).


stringThe text string to be converted (String).
conversionThe vbStrConv constant specifying the type of conversion (Integer):
1 = vbUpperCase
2 = vbLowerCase
3 = vbProperCase
4 = vbWide
8 = vbNarrow
16 = vbKatakana
32 = vbHiragana
64 = vbUnicode
128 = vbFromUnicode
LCID(Optional) Can be used if different from the LocaleID

REMARKS
* This function can be used to convert a string between lowercase, uppercase or propercase
* The "conversion" value is the sum of the values specifying the conversion you want to make.
* If "LCID" is left blank, then LocalID is the default.
* If "conversion" = vbWide, the text string converts any narrow (single byte) characters to wide (double byte) characters.
* If "conversion" = vbNarrow, the text string converts any wide (double byte) characters to narrow (single byte) characters.
* If "conversion" = vbKatakana, the text string converts from Hiragana characters to Katakana characters.
* If "conversion" = vbHiragana, the text string converts from Katakana characters to Hiragana characters.
* If "conversion" = vbFromUnicode, the text string is converted from Unicode into the default code page of the system.
* The equivalent .NET function is Microsoft.VisualBasic.Strings.StrConv
* For the Microsoft documentation refer to docs.microsoft.com

Debug.Print StrConv("in lowercase",vbUpperCase) = "IN LOWERCASE" 
Debug.Print StrConv("IN UPPERCASE",vbLowerCase) = "in uppercase"
Debug.Print StrConv("iN PROPERcase",vbProperCase) = "In Propercase"

© 2019 Better Solutions Limited. All Rights Reserved. © 2019 Better Solutions Limited Top