Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Caps in a cell

  Asked By: Bryant    Date: Sep 20    Category: MS Office    Views: 495
  

I am using Excel 2003 ...

Is there a way to make the letters in a cell all Caps after the cell
is filled?

Example: type msft; result - MSFT

I can use either a macro or VBA

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Tasha Wheeler     Answered On: Sep 20

* You could try this code.
* Right-click on the desired sheet tab and put the code in the
sheet's class module.
* Change Range("A:A") to reflect your needs.


Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim rngISect As Range

Set rngISect = Intersect(Target, Range("A:A"))

On Error Resume Next
If Not rngISect Is Nothing And Target.Value <> "" Then
Application.EnableEvents = False
Target.Value = UCase(Target.Value)
Application.EnableEvents = True
End If

End Sub

 
Didn't find what you were looking for? Find more on Caps in a cell Or get search suggestion and latest updates.




Tagged: