+ Reply to Thread
Results 1 to 6 of 6

VBA formatting does not change automatically

  1. #1
    Registered User
    Join Date
    05-04-2015
    Location
    Amsterdam, Netherlands
    MS-Off Ver
    office 2013
    Posts
    5

    VBA formatting does not change automatically

    Hi Guys,

    I have A file with Formatting done by VBA.
    IF I use a name in a cel, and that is in folder "dienstkleur" the cel wil be formatted.

    In this sheet (Per5) i have two sections. section where I write the names "C6:BF102".
    and a section ''C104:BF123" where i automatically check if the names in B104:B123 are used 2 times or not at all in a row.

    If the names are used two times the cel should be red. if it is not used at all the color should change automatically to orange.
    but this will not work in my file. can somebody check my file and find out what i should add to my VBA code to get it work?

    https://www.dropbox.com/s/5ooh6wxg8q...1%29.xlsm?dl=0

    Thanks in advance

    Adile

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

    Re: VBA formatting does not change automatically

    Hi there,

    Take a look at the attached version of your workbook and see if it does what you need.

    It uses the following code:

    Please Login or Register  to view this content.
    Conditional formatting has been used in the lower portion of the worksheet to highlight (in red) situations where a name appears more than once in a column.

    Hope this helps - please let me know how you get on.

    Regards,

    Greg M
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    05-04-2015
    Location
    Amsterdam, Netherlands
    MS-Off Ver
    office 2013
    Posts
    5

    Re: VBA formatting does not change automatically

    Hi Greg M,

    Thanx for your help in this matter.
    Your code is working and does what I need it to do in the lower portion of the worksheet. But in cells C6:BF102 the conditional formatting does not work any more.
    If can you combine the first half of my code with your code to get it work? I don't know how to do that.

    Adile

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

    Re: VBA formatting does not change automatically

    Hi again,

    The formatting performed by the VBA code appears to work correctly for me - i.e. if I enter "Exp" (without quotes) in Cell C6, the background colour of that cell changes to purple.

    Are you sure that Events are enabled in your application? (Run your "aan" routine to enable them.)

    Regards,

    Greg M

  5. #5
    Registered User
    Join Date
    05-04-2015
    Location
    Amsterdam, Netherlands
    MS-Off Ver
    office 2013
    Posts
    5

    Re: VBA formatting does not change automatically

    Hi,

    Greg I[m sorry, i dont know what i did wrong the first time but now it works.
    even without running the aan routine.
    thanks for your help!!!!

    Adile

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

    Re: VBA formatting does not change automatically

    Hi again,

    Many thanks for your feedback - delighted to hear that everything is working correctly for you now.

    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. Replies: 8
    Last Post: 07-16-2014, 01:20 PM
  2. Replies: 3
    Last Post: 11-04-2013, 12:47 AM
  3. Conditional Formatting - Change Text to CHAR(252) Automatically
    By nkitchen31 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-27-2013, 10:06 PM
  4. Automatically Change formatting of Cell in Another Sheet
    By BazzaBoy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-30-2012, 09:39 PM
  5. Replies: 4
    Last Post: 09-16-2010, 03:38 AM
  6. Column should be Change Automatically with change in Month
    By DILIP-NAIR in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-19-2008, 01:17 AM
  7. Replies: 1
    Last Post: 01-11-2005, 06:06 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