Hi,
I am trying capitalize first letter of each string and lower case rest between columns C and F. I am using below vba code however it's giving me run time error 91. Can anyone help me with this problem?
I am trying capitalize first letter of each string and lower case rest between columns C and F. I am using below vba code however it's giving me run time error 91. Can anyone help me with this problem?
VBA Code:
Sub ConvertUppercaseInRange()
Application.ScreenUpdating = False
Worksheets("StaPVM").Activate
Dim rng As Range
rng = Columns("c:f").Select
For Each rng In ActiveSheet.UsedRange
rng.Value = StrConv(rng.Value, vbProperCase)
Next rng
Application.ScreenUpdating = True
End Sub