View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default making text in Title Case automatically

Would require worksheet event code.

As written, the code below affects all cells in columns A through H

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Column 8 Then Exit Sub
On Error GoTo ErrHandler
Application.EnableEvents = False
Target.Formula = Application.Proper(Target.Formula)
ErrHandler:
Application.EnableEvents = True
End Sub

Right-click on sheet tab and "View Code".

Copy/paste the code into that module.


Gord Dibben MS Excel MVP

On Fri, 9 Jun 2006 17:50:52 -0500, tweety127
wrote:


hi, how can i make all the text inputs be in Title Case format
automatically, even if the user input a different case pattern?