Option Explicit
Sub SpecialFormat()
On Error Resume Next
Selection.NumberFormat = "$#,##0.00"
If Err.Number <> 0 Then
Beep
Err.Clear
End If
On Error GoTo 0
End Sub
It's not really doing too much. The line that tries to do all the work is:
Selection.NumberFormat = "$#,##0.00"
That's just changing the number format.
The other stuff is just to make it so that if something goes wrong, you don't
get any messages. If the worksheet is protected, then you may not be able to
change the format. So instead of having the macro blow up, it just beeps at
you.
Dave, thanks much. Any chance you could briefly translate the macro into
what it's accomplishing? Sort of the 'teach the man to fish' syndrome in me,
who wants to know what the steps are, for future use.
Appreciate the guidance on the general steps to take.