+ Reply to Thread
Results 1 to 3 of 3

Auto upper case for specific range of cells

  1. #1
    Registered User
    Join Date
    10-23-2013
    Location
    St George, UT
    MS-Off Ver
    Excel 2010
    Posts
    15

    Auto upper case for specific range of cells

    I have a workbook with only this code and it works great:

    Please Login or Register  to view this content.
    I also have a workbook with code to bold/unbold a range of 31 numbers that represent a month. It also counts the number of bold numbers and tallies them in a separate cell. The part of the code that runs the bold and count works great but the auto upper case doesn't work in this workbook and is as follows:
    Please Login or Register  to view this content.
    I can't figure why it doesn't work. The only change I made is to change the first line of the "upper case" formula because I was getting an error message. I changed it from "Private Sub Worksheet_Change(ByVal Target As Range)" to "Private Sub Worksheet_SelectionChange(ByVal Target As Range)"

    Please help and thanks!

  2. #2
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Auto upper case for specific range of cells

    The first code operates on the change event handler. The second code runs on the selection change event handler.

    This means that the target variable is a different Range in each code.
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  3. #3
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Auto upper case for specific range of cells

    I think you were getting the error message because you had two worksheet change macros, you should combine them rather than changing the sub header of one:
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Auto display range as upper case
    By BigD1969 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 09-15-2008, 07:43 PM
  2. How to change mixed case to upper case in Excel for all cells
    By WordAlone Network in forum Excel General
    Replies: 6
    Last Post: 02-14-2006, 08:10 PM
  3. Auto Upper Case
    By jamphan in forum Excel General
    Replies: 1
    Last Post: 01-05-2006, 05:50 PM
  4. Replies: 14
    Last Post: 08-25-2005, 10:05 PM
  5. [SOLVED] How do I convert all upper case excel sheet into upper and lower .
    By DebDay in forum Excel General
    Replies: 1
    Last Post: 03-09-2005, 05:06 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