Upper Case only?

  • Thread starter Thread starter Freddie
  • Start date Start date
F

Freddie

I'm using Excel 2007, is it possible for me to format a column so that any
letters typed into it are automatically shown as upper case, regardless of
whether I have Caps Lock switched on?
Thanks for any replies.
 
Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "A:A" '<== change to suit

On Error GoTo ws_exit
Application.EnableEvents = False

If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
With Target
If Not .HasFormula Then
.Value = UCase(.Value)
End If
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Hi Freddie,

Bob Phillips gave you a VBA approach. You can also format the cells using a
font that only shows uppercase characters, such as;
Felix Titling
Perpetua Titling
Stencil
Showcard Gothic
Goudy Stout

Ed Ferrero
www.edferrero.com
 
Just a note about the font approach...

If you share the workbook with others, then they'll have to have to have the
same font installed on their pc.

(Excel can't embed fonts into the its documents like MSWord.)
 
Thanks for that Dave.

Dave Peterson said:
Just a note about the font approach...

If you share the workbook with others, then they'll have to have to have
the
same font installed on their pc.

(Excel can't embed fonts into the its documents like MSWord.)
 
Back
Top