VBA/Excel/Access/Word/String Functions/StrConv

Материал из VB Эксперт
Перейти к: навигация, поиск

StrConv: vbLowerCase

 
Sub UsefulStringFunctions() 
    Dim sTestWord As String 
    sTestWord = "The moon over Minneapolis is big and bright." 
    Debug.Print sTestWord
    Debug.Print StrConv(sTestWord, vbLowerCase) 
End Sub



StrConv: vbProperCase

 
Sub UsefulStringFunctions() 
    Dim sTestWord As String 
    sTestWord = "The moon over Minneapolis is big and bright." 
    Debug.Print sTestWord
    Debug.Print StrConv(sTestWord, vbProperCase) 
End Sub



StrConv: vbUpperCase

 
Sub UsefulStringFunctions() 
    Dim sTestWord As String 
    sTestWord = "The moon over Minneapolis is big and bright." 
    Debug.Print sTestWord
    
    Debug.Print StrConv(sTestWord, vbUpperCase) 
End Sub



vbFromUnicode: Converts the given string from Unicode to the system"s default code page.

 
Sub strConv5()
    Debug.Print STRConv("lowerCase", vbFromUnicode)
End Sub



vbLowerCase: Converts the given string to lowercase characters.

 
Sub strConv2()
    Debug.Print STRConv("lowerCase", vbLowerCase)
End Sub



vbProperCase: Converts the given string to propercase (aka title case-the first letter of every word is capitalized).

 
Sub strConv3()
    Debug.Print STRConv("lowerCase", vbProperCase)
End Sub



vbUnicode: Converts the given string to Unicode using the system"s default code page.

 
Sub strConv4()
    Debug.Print STRConv("lowerCase", vbUnicode)
End Sub



vbUpperCase: Converts the given string to uppercase characters.

 
Sub strConv1()
    Debug.Print STRConv("lowerCase", vbUpperCase)
End Sub