Capital format

  • Thread starter Thread starter Voodoodan
  • Start date Start date
V

Voodoodan

Hello!

Does anyone know of a way to make sure that when a user types some
information into a cell, it reverts to capital letters even when text
is input in lower case?

Thanks,
Dan.
 
Dan, put this in the worksheet code, will change whats put in A1 to caps

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo Error_handler
If Not Intersect(Range("A1"), Target) Is Nothing Then
With Target
If Not .HasFormula Then
Application.EnableEvents = False
.Value = UCase(.Value)
End If
End With
End If

Error_handler:
Resume Next
Application.EnableEvents = True
End Sub

--
Paul B
Always backup your data before trying something new
Using Excel 97 & 2000
Please post any response to the newsgroups so others can benefit from it
** remove news from my email address to reply by email **
 
Back
Top