+ Reply to Thread
Results 1 to 4 of 4

Change Color of a group of Command Buttons

  1. #1
    Registered User
    Join Date
    04-24-2022
    Location
    Manchester, uk
    MS-Off Ver
    Excel 2010
    Posts
    2

    Change Color of a group of Command Buttons

    I have a worksheet with 28 ActiveX command buttons. When a button is clicked, its macro performs an action and changes that button's backcolour. I need to create a macro to reset all buttons to their original pale grey color. Is there a way to do this without using 28 lines of code to change each one individually?

  2. #2
    Forum Expert
    Join Date
    10-11-2021
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    1,505

    Re: Change Color of a group of Command Buttons

    Please Login or Register  to view this content.

  3. #3
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,645

    Re: Change Color of a group of Command Buttons

    Hi there,

    See if the following code does what you need:

    Please Login or Register  to view this content.

    Hope this helps.

    Regards,

    Greg M



    P. S. Your project must include a reference to the "Microsoft Forms n.n Object Library".
    Last edited by Greg M; 04-30-2022 at 01:41 PM. Reason: P. S. added

  4. #4
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,645

    Re: Change Color of a group of Command Buttons

    Hi again,

    Many thanks for the Reputation increase - much appreciated!

    Best regards,

    Greg M

+ 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. Command buttons change color when filters are applied or rows are resized
    By MiguelDominguez in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-12-2019, 12:23 PM
  2. Replies: 2
    Last Post: 05-03-2014, 02:19 PM
  3. Replies: 0
    Last Post: 02-05-2014, 12:34 AM
  4. Code for a master command button to change the backcolor of multiple command buttons?
    By panttherm5 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-16-2012, 10:11 PM
  5. Change Color on Command Buttons
    By nury786 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-02-2012, 12:35 PM
  6. Change Background Color of All Command Buttons
    By CharlesM in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-14-2012, 03:20 AM
  7. [SOLVED] COMMAND BUTTONS and CELL COLOR
    By hookfault in forum Excel General
    Replies: 2
    Last Post: 04-10-2006, 06:50 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