How to format cells in upercase entry

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I read the post for this question (8/8/2006) and Gord Dibben's answer works
great.

Original Question:

I need to format a column so that all cell force any text entry to uppercase.

Gord Dibben's Answer:

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 = UCase(Target.Formula)
ErrHandler:
Application.EnableEvents = True
End Sub


This code allows all columns up to column 8 (column H) to be affected

What I would like to know is can I nominate a particular column that this
works on.

For example I would like only column M to be affected

Thanks

JOhn
 
Back
Top