✅ HTML Code: VBA Case Conversion Macros for MS Word & Excel
VBA Code for Case Conversion in Word & Excel ๐ป VBA Case Conversion Macros for MS Word and MS Excel This page includes useful VBA macros to convert selected text to UPPER CASE , lower case , Proper Case , and Toggle Case for both Microsoft Word and Excel. ๐ Microsoft Word VBA Codes ๐ Convert to UPPER CASE Sub ConvertToUpperCase() Selection.Range.Text = UCase(Selection.Range.Text) End Sub ๐ก Convert to lower case Sub ConvertToLowerCase() Selection.Range.Text = LCase(Selection.Range.Text) End Sub ๐
ฟ️ Convert to Proper Case Sub ConvertToProperCase() Selection.Range.Text = StrConv(Selection.Range.Text, vbProperCase) End Sub ๐ Toggle Between All Cases Sub ToggleTextCase() Dim txt As String Dim newText As String txt = Selection.Range.Text If txt = UCase(txt) Then newText = StrConv(txt, vbProperCase) ElseIf txt = StrConv(txt, vbProperCase) Then newText = LCase(txt) Else n...
Comments
Post a Comment