automatic capital letters

  • Thread starter Thread starter NYBoy
  • Start date Start date
N

NYBoy

2 Questions.

(1) I would like to set up the row so that ALL LETTERS in that ro
would become Capital letter auromatically.

(2) In the second row, I would like excel to capitalize the FIRS
letter of each word automatically as I type in the cell
 
NYBoy, put this in the worksheet code

Private Sub Worksheet_Change(ByVal Target As Range)
'will change row 1 to caps, row 2 to proper
On Error GoTo Error_handler

With Target
If Not .HasFormula Then
Application.EnableEvents = False
If Target.Row = 1 Then Target.Value = UCase(Target.Value)
If Target.Row = 2 Then Target.Value = Application.Proper(Target.Value)

Application.EnableEvents = True
End If
End With

Error_handler:
Resume Next

End Sub


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2000 & 2003
** remove news from my email address to reply by email **
 
Back
Top