Hello All, Can I have some help please on this.
This neat piece of code allows you to select a range of cells and then run this macro to change the font to
Upper Case, Lower Case, or Proper Case.
To do this you have to remove the comment tag for each case you want. Is it possible that when you run the macro a message box pops up and lets you to select which case font you want.
Sub ChangeCase()
Dim Rng As Range
On Error Resume Next
Err.Clear
Application.EnableEvents = False
For Each Rng In Selection.SpecialCells(xlCellTypeConstants, _
xlTextValues).Cells
If Err.Number = 0 Then
' Rng.Value = StrConv(Rng.Text, vbUpperCase)
'Rng.Value = StrConv(Rng.Text, vbLowerCase)
Rng.Value = StrConv(Rng.Text, vbProperCase)
End If
Next Rng
Application.EnableEvents = True
End Sub
This neat piece of code allows you to select a range of cells and then run this macro to change the font to
Upper Case, Lower Case, or Proper Case.
To do this you have to remove the comment tag for each case you want. Is it possible that when you run the macro a message box pops up and lets you to select which case font you want.
Sub ChangeCase()
Dim Rng As Range
On Error Resume Next
Err.Clear
Application.EnableEvents = False
For Each Rng In Selection.SpecialCells(xlCellTypeConstants, _
xlTextValues).Cells
If Err.Number = 0 Then
' Rng.Value = StrConv(Rng.Text, vbUpperCase)
'Rng.Value = StrConv(Rng.Text, vbLowerCase)
Rng.Value = StrConv(Rng.Text, vbProperCase)
End If
Next Rng
Application.EnableEvents = True
End Sub