View Single Post
  #4   Report Post  
JE McGimpsey
 
Posts: n/a
Default

Two quibbles -

This code assumes that there's only one cell selected. If Range("Input")
was defined as cell J1, and cells A1:J10 were selected, cell A1 would
be coerced to upper case, not J1.

Also, without disabling events, assigning the value will create a
recursive call to Worksheet_Change, which will terminate when XL runs
out of stack space. Fortunately, XL terminates nicely, in that case, but
it's not good practice.


In article ,
"Alan" wrote:

This code will do it, you need to name the columns as a named range that you
want it to apply to, in the this code the ranges are named 'Input' but
obviously you can use any name. If you are unfamiliar with naming ranges or
using code post back and I (or someone else!) will give advice,
Regards,
Alan.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Not Application.Intersect(Target, Range("Input")) Is Nothing Then
Target(1).Value = UCase(Target(1).Value)
End If
End Sub

"thomas donino" wrote in message
...
I want to set up certain columns in my spreasheet so that all text entered
into it shows in caps