+ Reply to Thread
Results 1 to 5 of 5

Toggle multiple font colors

  1. #1
    Registered User
    Join Date
    03-22-2014
    Location
    United States, United States
    MS-Off Ver
    Excel 2007
    Posts
    2

    Toggle multiple font colors

    Hi,

    I'm new to VBA. I'm trying to write a macro that toggles between three or more font colors for the cells that are selected. I started with the "record macro" feature and then tinkered with the code because I obviously don't have a very good understanding of this process yet. How would I go about writing a code like this?

    Thanks.

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,863

    Re: Toggle multiple font colors

    Please Login or Register  to view this content.
    write some data in some cells in range some range change color of tex in some to red some to yellow and some light blue (and some other colors) select the range with data and run the macro firs time then next and again, and ...
    Best Regards,

    Kaper

  3. #3
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Toggle multiple font colors

    Take a look at the file in post#4 of the following thread.
    http://www.excelforum.com/excel-prog...-blinking.html

    It uses code like the following (written and tested using Excel 2003) to have a cell blink in a sequence of three colors.
    Please Login or Register  to view this content.
    Lewis
    Last edited by LJMetzger; 03-22-2014 at 12:17 PM. Reason: Made sample code generic

  4. #4
    Registered User
    Join Date
    03-22-2014
    Location
    United States, United States
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Toggle multiple font colors

    Thanks for that starter Kaper!

    I appreciate the help!

  5. #5
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,863

    Re: Toggle multiple font colors

    Glad it helped.
    See also Lewis proposition - it uses another property - color, not colorindex wich allows for much reacher palette of colors.
    And following forum rules please mark thread as solved.

+ 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. Replies: 1
    Last Post: 11-19-2012, 12:04 PM
  2. Set multiple font colors within a single cell
    By nigelb in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-12-2009, 11:31 AM
  3. file font colors
    By Dan H. in forum Excel General
    Replies: 2
    Last Post: 06-25-2006, 05:50 PM
  4. [SOLVED] Font colors
    By RoyR in forum Excel General
    Replies: 2
    Last Post: 10-19-2005, 08:05 PM
  5. [SOLVED] Can't format font colors or cell fill-in colors
    By canoeron in forum Excel General
    Replies: 3
    Last Post: 08-22-2005, 07: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