How to format cells in upercase entry

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
 

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