Upper Case Macro
Sam,
Using .value is taking an unnecessary risk. What it will do is change any
formula selected (maybe by accident) to values. Use .formula instead or check
using something like
If Not r.HasFormula Then r.Value = UCase(r.Value)
Mike
"Sam Wilson" wrote:
Sub upper()
Dim r As Range
For Each r In Selection
r.Value = UCase(r.Value)
Next r
End Sub
"Phil H" wrote:
I need a macro, which will be attached to a button, to change text to upper
case for any range of selected cells. Can someone help?
|