+ Reply to Thread
Results 1 to 3 of 3

Macro deletes multiple lines of comments.

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    10-14-2007
    MS-Off Ver
    Excel 2021
    Posts
    121

    Macro deletes multiple lines of comments.

    I set up a macro that will timestamp and insert user name before inputting notes. Problem is the comments field can balloon to 10+ lines and the macro begins to delete data once there are more then 7 lines of comments. The attached spreadsheet details the problem i'm dealing with.
    Attached Files Attached Files
    Last edited by impala096; 02-25-2011 at 04:46 PM.

  2. #2
    Valued Forum Contributor blane245's Avatar
    Join Date
    02-20-2009
    Location
    Melbourne, FL
    MS-Off Ver
    Excel 2010
    Posts
    649

    Re: Macro deletes multiple lines of comments.

    Question 1 - I think what is happening to you is that the limiting for cell text in Excel 2003 is 256 characters. You might try changing ActiveCell.Text to ActiveCell.Value is see if that works better. I can't confirm this as I am now runing Excel 2010.

    Question 2 - Excel has no mean to signal event to a cell while it is being modified so you can't invoke the macro while in the middle of editing a cell. You can, however, do what you need after existing the cell. See the Worksheet Change event for a possible way ahead. You will need to develop rules about what cells to annotate to do this automatically.
    Bob
    Click my star if my answer helped you. Mark the thread as [SOLVED] if it has been.

  3. #3
    Forum Contributor
    Join Date
    10-14-2007
    MS-Off Ver
    Excel 2021
    Posts
    121

    Re: Macro deletes multiple lines of comments.

    Blane,

    In regards to question #1, changing the code to ActiveCell.Value appears to have worked like a charm. It's no longer overriding the comments field.

    Thanks for your timely response and simple resolution to this annoying problem i've dealt with for months now!

+ 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