Results 1 to 2 of 2

Auto Upper Case Problems

Threaded View

  1. #1
    Registered User
    Join Date
    03-12-2017
    Location
    BATH UK
    MS-Off Ver
    2016
    Posts
    6

    Auto Upper Case Problems

    I am using the code below to force everything to upper case

    Private Sub Worksheet_Change(ByVal Target As Range)
        If Not (Application.Intersect(Target, Range("A1:B10")) _
          Is Nothing) Then
            With Target
                If Not .HasFormula Then
                    Application.EnableEvents = False
                    .Value = UCase(.Value)
                    Application.EnableEvents = True
                End If
            End With
        End If
    End Sub
    Works fine until i wast to copy a cell by dragging down, then i get this

    Run Time Error 13
    Type Mismatch

    Is there a way to force upper case and allow me to copy from say a1 to a2:a20

    Thanks

    Graham
    Last edited by MOTORBIKEBITZ; 04-01-2017 at 11:59 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] VBA macro UPPER auto case
    By Peterino in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 11-17-2014, 03:34 PM
  2. Auto convert lower case to Upper in same cell
    By russkris in forum Excel General
    Replies: 9
    Last Post: 08-08-2014, 06:49 AM
  3. [SOLVED] Lower Case to Upper Case but No Auto Correction : Solved by Mod (6StringJazzer)
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-27-2014, 10:44 AM
  4. [SOLVED] Auto upper case for specific range of cells
    By giligancow in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-25-2013, 12:21 PM
  5. Auto display range as upper case
    By BigD1969 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 09-15-2008, 07:43 PM
  6. Auto Upper Case
    By jamphan in forum Excel General
    Replies: 1
    Last Post: 01-05-2006, 05:50 PM
  7. Replies: 14
    Last Post: 08-25-2005, 10:05 PM

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