+ Reply to Thread
Results 1 to 6 of 6

Conditional Formatting by VBA, Highlight color when If conditions satisfied

  1. #1
    Forum Contributor
    Join Date
    05-12-2012
    Location
    India, Chennai
    MS-Off Ver
    Excel 2003
    Posts
    182

    Conditional Formatting by VBA, Highlight color when If conditions satisfied

    Hi Experts

    Please help with this task

    I have two workbook (Please refer attachment)
    1. StartPage.xlsm
    2. CPBook.xlsm

    In StartPage.xlsm I have a button where the action is triggered. On this button click
    Open CPBook.xlsm, WorkSheet: CP
    1. IF Cell A Range has some value and B Range is Null then Change Cell B into Red
    2. IF Cell A, B and C has some value and D Range is Null then Change Cell D into Red
    3. IF Cell A and B has some value and C and D Range is Null then Change C and D into Blue

    The trigger action can be done only from the StartPage.xlsm

    Please help me with coding

    Thanks for your time.
    Attached Files Attached Files

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

    Re: Conditional Formatting by VBA, Highlight color when If conditions satisfied

    Hi Skhari. Maybe the conditional formatting is suitable for you. See attachment.
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    05-12-2012
    Location
    India, Chennai
    MS-Off Ver
    Excel 2003
    Posts
    182

    Re: Conditional Formatting by VBA, Highlight color when If conditions satisfied

    Hi nilem

    Thanks for reply.
    But I need it different way.
    I have no control over the CP.xlsm. Only with the help of StartPage.xlsm I can trigger this conditional formatting options.
    User will not have knowledge to make conditional formatting in each page, every month.
    CP.xlsm is generated every month automatically by the timer machine. So I need an external WorkBook with Button to make this action.
    Please help in this way. thats the reason I have uploaded StartPage.xlsm with the button inside

    Thanks for your time

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

    Re: Conditional Formatting by VBA, Highlight color when If conditions satisfied

    ok, try this
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    05-12-2012
    Location
    India, Chennai
    MS-Off Ver
    Excel 2003
    Posts
    182

    Re: Conditional Formatting by VBA, Highlight color when If conditions satisfied

    Hi Nilem

    Run time error 1004
    Debug > .FormatConditions(i).Delete

    !!! I am stuck in this error. Please guide

    Thanks

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

    Re: Conditional Formatting by VBA, Highlight color when If conditions satisfied

    Try this
    Please Login or Register  to view this content.
    or just delete these lines

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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