View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Auto Capitalising an active cell

Hi,

Try this

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Or IsEmpty(Target) Then Exit Sub

If Not Intersect(Target, Range("f:f")) Is Nothing Then
If Not Target.HasFormula Then
On Error Resume Next
Application.EnableEvents = False

Target.Value = UCase(Target.Formula)

Application.EnableEvents = True
On Error GoTo 0
End If
End If

End Sub

Mike

"NoodNutt" wrote:

G'day Everyone

can someone help fill the blanks (using 2000 format) in the following
please.

I need for each cell containing data in column of "F" to AutoCapitalise
after the user moves to any other cell.

I know in Access you can force the field to do this, but I am unsure of the
Excel equivalent.

Now, I know this next bit is way wrong, so if anyone has something to fill
the gaps in, that'd be sweet.


Private Sub Worksheet_SelectionChange(ByVal Target As Range)

activecell.Format = AutoCapital

End Sub

TIA
Regards
Mark.