+ Reply to Thread
Results 1 to 5 of 5

Help with code, userform button to change cell font color

  1. #1
    Registered User
    Join Date
    08-28-2019
    Location
    Roseville
    MS-Off Ver
    excel 2013
    Posts
    15

    Help with code, userform button to change cell font color

    Hi Everyone,

    I have made a custom right click menu. In it is a button called Font that brings up a custom userform, here if the user clicks a button I would like it to change the font red, if they click the second button it changes the font black though I can't seem to get any code to work to do that.

    Any help is appreciated. Thanks.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,443

    Re: Help with code, userform button to change cell font color

    Administrative note

    In the future please be careful to post in the correct sub forum. As code is needed you should ahve posted in the VBA forum. I will move it for you
    Thanks

  3. #3
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,295

    Re: Help with code, userform button to change cell font color

    Attached userform with buttons coded
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    08-28-2019
    Location
    Roseville
    MS-Off Ver
    excel 2013
    Posts
    15

    Re: Help with code, userform button to change cell font color

    Thank you, that did get the buttons to work however the entire rows/regions are changing and not just the active cell.

  5. #5
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,295

    Re: Help with code, userform button to change cell font color

    You answered your own question. (ActiveCell).
    Select cell, select 'ShowForm', select colour button.
    Attached Files Attached Files

+ 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. Change font color of multiple objects at once with shorter code?
    By frankytheman in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-20-2020, 01:28 AM
  2. [SOLVED] VB code to change font color of cell with criteria
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-23-2018, 10:53 AM
  3. Code to change row (cell range) color with or without button
    By asd.sparky in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-21-2017, 11:43 PM
  4. [SOLVED] VB Code to change Font color
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-28-2014, 07:10 PM
  5. Change font color based on font color of another cell
    By Ibyers in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2012, 09:36 AM
  6. Userform-Change textbox color and font based on input in other tex
    By Neal in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-21-2005, 08:05 PM

Tags for this Thread

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