+ Reply to Thread
Results 1 to 9 of 9

Failed to clear comments for a few cells

  1. #1
    Forum Contributor
    Join Date
    01-15-2013
    Location
    London
    MS-Off Ver
    Excel 2003, 2007, 2010, 2019
    Posts
    436

    Failed to clear comments for a few cells

    Hi everyone,

    I'm trying to clear comments for a few cells as below, but the code does not work. Do you know why?

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Failed to clear comments for a few cells

    Please Login or Register  to view this content.
    You'll also need to check the cell actually contains a comment or it'll error...

  3. #3
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Failed to clear comments for a few cells

    Hi blillj:

    The syntax to specify specific cells in the range is:

    Please Login or Register  to view this content.
    but, if the range is contiguous as in your code (wasn't sure if it is just an example or the real code), I'd use:

    Please Login or Register  to view this content.
    Last edited by Arkadi; 03-14-2017 at 09:09 AM.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  4. #4
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Failed to clear comments for a few cells

    As cytop wisely pointed out, you will get errors when there are no comments, perhaps:

    Please Login or Register  to view this content.

  5. #5
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Failed to clear comments for a few cells

    Or simply this
    Please Login or Register  to view this content.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  6. #6
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Failed to clear comments for a few cells

    @ xlnitwit, lol... I hate not thinking of the obvious! Nice job.

  7. #7
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Failed to clear comments for a few cells

    Thank you. Sometimes it's good to have a brain that only thinks in straight lines!

  8. #8
    Forum Contributor
    Join Date
    01-15-2013
    Location
    London
    MS-Off Ver
    Excel 2003, 2007, 2010, 2019
    Posts
    436

    Re: Failed to clear comments for a few cells

    Many thanks, everyone. It works perfectly now

  9. #9
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Failed to clear comments for a few cells

    You're welcome, thanks for marking as solved, the rep, and the feedback

+ 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] Clear Cells Not Clear
    By prjt in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-15-2015, 03:23 PM
  2. Replies: 1
    Last Post: 10-09-2015, 10:10 PM
  3. Replies: 7
    Last Post: 02-04-2014, 06:42 PM
  4. Copy and clear Comments from once woork book to other workbook
    By dhrumilp in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-12-2013, 06:05 PM
  5. Add comments to cells using VBA (comments from list)
    By maacmaac in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-15-2010, 12:11 PM
  6. Clear cell content and comments takes a long time
    By Snoopy2003 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-23-2010, 06:28 AM
  7. how can we copy cells comments text and paste to cells
    By שי פלד in forum Excel General
    Replies: 3
    Last Post: 12-12-2005, 02:00 AM

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