Auto Proper Case on Entry

J

John

I wish to change the values entered within an area to PROPER case on entry.
I have the following code which I use to automatically change all entered
values to UPPER

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count = 1 Then
If Not Intersect(.Cells, Range("C16:F16")) Is Nothing Then
Application.EnableEvents = False
.Value = UCase(.Value)
Application.EnableEvents = True
End If
End If
End With
End Sub

I thought it was a 'simple' case of just changing the text UCase to
something like ProperCase or PCase, but it doesn't work.

Can someone help?

Thanks
 
P

Paul B

John, try,
..Value = Application.Proper(Target.Value)

--
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 2002 & 2003
 
J

John

Thanks Paul works a treat


Paul B said:
John, try,
.Value = Application.Proper(Target.Value)

--
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 2002 & 2003
 
P

Paul B

Your Welcome

--
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 2002 & 2003
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top