+ Reply to Thread
Results 1 to 2 of 2

using conditional formatting from a worksheet as a condition for the command button on a u

  1. #1
    Forum Contributor
    Join Date
    01-06-2019
    Location
    Australia
    MS-Off Ver
    2019
    Posts
    209

    using conditional formatting from a worksheet as a condition for the command button on a u

    Hello,

    I have a user form on another workbook where I am opening a workbook putting the data into the correct cells and then saving that workbook and printing Sheet2

    However on Sheet1 there is some conditional formatting that will be green if passed and red if failed.

    Can I check the colour of those cells after the data is in the cells and get a message that all has passed on the user form please proceed with printing and saving the file?

    Thank you for any help provided

  2. #2
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,912

    Re: using conditional formatting from a worksheet as a condition for the command button on

    You can loop through the range and test the DisplayFormat.Interior.Color property of each one to see if it matches the colour for passing.
    Rory

+ 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. [SOLVED] VBA Command Button not formatting
    By jimrosser in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-19-2019, 11:51 AM
  2. [SOLVED] Check if command button is on worksheet, delete worksheet if not
    By Jerbinator in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-13-2016, 08:50 AM
  3. [SOLVED] Shape as a button to replace a Command Button which operates conditional format.
    By A440 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-26-2015, 05:46 PM
  4. How to make the command button override the conditional formatting
    By SerraAngel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-05-2014, 04:03 PM
  5. enable/disable a command button in User Form w/ condition
    By Bidyut Chakraborty in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-02-2014, 03:11 AM
  6. [SOLVED] Submit button - how to add command 'remove' conditional formatting in code?
    By WillGe in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-18-2012, 08:34 PM
  7. [SOLVED] How do I hide a command button based on a condition?
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-03-2006, 09:50 AM

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