+ Reply to Thread
Results 1 to 3 of 3

Conditional Formatting if cell contains a comment

  1. #1
    Registered User
    Join Date
    03-13-2008
    Posts
    87

    Conditional Formatting if cell contains a comment

    Hello there,

    I'm trying to use this same VBA code as this post http://www.excelforum.com/excel-prog...ml#post3597872, but can't get it to work? I have inputted this in my normal module under:
    -VBAProject (LL Text.xlsm)
    -Modules
    -Module 2

    Please Login or Register  to view this content.
    However whenever I go back to my sheet and add the =HasComment(A1) into my conditional formatting nothing happens. If I press Alt+F8, the Module isn't selectable to run. Is there a way to have this run automatically when I insert a comment to my document?

    This is the first time I'm trying to use a VBA code so I'm sure it's something I'm doing wrong.

    Thanks,
    Lorne

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,457

    Re: Conditional Formatting if cell contains a comment

    See the attached example.

    Regards, TMS
    Attached Files Attached Files
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    03-13-2008
    Posts
    87

    Re: Conditional Formatting if cell contains a comment

    Thank you TMShucks! I couldn't get it working in my excel file so I just copied over my content into yours and it's now working.

    Thanks,
    Lorne

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,457

    Re: Conditional Formatting if cell contains a comment

    You're welcome.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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. Conditional formatting based on internal cell comment
    By dminkov in forum Excel General
    Replies: 7
    Last Post: 04-23-2014, 03:47 AM
  2. Conditional formatting if same cell contains a comment
    By theirishdancer in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-24-2014, 07:12 PM
  3. Replies: 10
    Last Post: 10-07-2012, 04:50 PM
  4. Conditional Formatting - if insert a comment
    By rexwrx in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-31-2006, 01:13 AM
  5. [SOLVED] Formatting conditional on absence of comment
    By Lon Sarnoff in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-07-2006, 06:25 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