+ Reply to Thread
Results 1 to 8 of 8

VBA to uppercase

  1. #1
    Forum Contributor
    Join Date
    04-05-2013
    Location
    CT
    MS-Off Ver
    Excel 2010
    Posts
    360

    VBA to uppercase

    I was using this code to auto uppercase my text:

    Please Login or Register  to view this content.
    i changed it to this to allow my to format different color text in certain cells but now it will not upper case my text? any ideas

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    04-24-2007
    Location
    NYC
    MS-Off Ver
    2k3/2k7/2010
    Posts
    270

    Re: VBA to uppercase

    You can't change ".text" it is read only.

    You have to use .Value

  3. #3
    Forum Contributor
    Join Date
    04-05-2013
    Location
    CT
    MS-Off Ver
    Excel 2010
    Posts
    360

    Re: VBA to uppercase

    i changed the .text to .value and it still doesnt work?

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    04-24-2007
    Location
    NYC
    MS-Off Ver
    2k3/2k7/2010
    Posts
    270

    Re: VBA to uppercase

    Double postion
    Last edited by slx; 10-02-2013 at 02:33 PM. Reason: double post

  5. #5
    Forum Contributor
    Join Date
    04-24-2007
    Location
    NYC
    MS-Off Ver
    2k3/2k7/2010
    Posts
    270

    Re: VBA to uppercase

    .Value was not a replacement for .text <- Your first example shows you that.

    .Value replaces all of characters(n, 1).text)

    Any reason why you are using characters instead of value?

    Please Login or Register  to view this content.

  6. #6
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: VBA to uppercase

    maybe so
    Please Login or Register  to view this content.

  7. #7
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: VBA to uppercase

    Hi Adamheon!

    different color text in certain cells
    what are those certain text.. and where is code for color.. please confirm..

    in the meanwhile.. try this..

    Please Login or Register  to view this content.
    Regards!
    =DEC2HEX(3563)

    If you like someone's answer, click the star to give them a reputation point for that answer...

  8. #8
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,265

    Re: VBA to uppercase

    Can you post a workbook where that second code fails to change the case? It works fine for me and preserves the formatting - tested in 2003 and 2010. Quite clever, by the way.
    Remember what the dormouse said
    Feed your head

  9. #9
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: VBA to uppercase

    Quote Originally Posted by slx View Post
    You can't change ".text" it is read only.

    You have to use .Value
    That is not correct - you cannot change the Range.Text but you can change the Characters.Text property

+ 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. Uppercase
    By Real Dummy in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-21-2006, 08:50 PM
  2. Uppercase
    By Worzel Gummidge in forum Excel General
    Replies: 2
    Last Post: 01-16-2006, 12:55 PM
  3. [SOLVED] colums in uppercase only
    By Dino Thomas in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-06-2005, 05:05 PM
  4. colums in uppercase only
    By Dino Thomas in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  5. hi...help with uppercase?? HOW??
    By Piyush in forum Excel General
    Replies: 1
    Last Post: 01-05-2005, 11:21 AM

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