+ Reply to Thread
Results 1 to 2 of 2

Auto Upper Case

  1. #1
    Registered User
    Join Date
    02-18-2005
    Posts
    44

    Auto Upper Case

    Is it possible to have cells to automatically change the text to all Upper case. I know there is a formula but I want it to change when the user types in text and goes to another cell it will change to all caps.

  2. #2
    Jim Rech
    Guest

    Re: Auto Upper Case

    The only way to do what you want is with a macro. This article describes
    how a Selection_Change macro works:

    http://support.microsoft.com/kb/305565/en-us

    but, instead of the code in step 4, you've have:

    Private Sub Worksheet_Change(ByVal Target As Range)
    Dim r As Range

    'Set the range for the formatting changes to A1:A5.
    Set r = Intersect(Range("A1:A5"), Target)

    'If the change in the worksheet is not in the tested range, exit the
    macro.
    If r Is Nothing Then Exit Sub

    'Change for uppercasing:
    Application.EnableEvents = False
    r.Value = UCase(r.Value)
    Application.EnableEvents = True

    End Sub

    In the above code only cells in the range A1:A5 would be uppercased. If you
    wanted the entire sheet affected you'd get rid of the Set and If lines and
    use Target.Value = UCase(Target.Value)

    --
    Jim
    "jamphan" <[email protected]> wrote in
    message news:[email protected]...
    |
    | Is it possible to have cells to automatically change the text to all
    | Upper case. I know there is a formula but I want it to change when the
    | user types in text and goes to another cell it will change to all caps.
    |
    |
    | --
    | jamphan
    | ------------------------------------------------------------------------
    | jamphan's Profile:
    http://www.excelforum.com/member.php...o&userid=20105
    | View this thread: http://www.excelforum.com/showthread...hreadid=498428
    |



+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1