Removing User Name from Comments

March 8, 2010 by datapig Leave a reply »

When you insert a comment into Excel, your username is automatically inserted into the comment followed by a colon.  For instance, if you log into your computer using the user name TrunkOfFunk.  Your comments will all start with TrunkOfFunk:.

.

This annoys me to no end.  Theoretically, this "feature" is supposed to tell you who inserted the comments.  I don't think I have ever needed to know that Donna inserted a comment into cell B2. In my opinion, the user name just clutters up the comment. 

.

If you share my distain for the forced username in comments, here is a small procedure that will go through all comments and remove the username.  This is especially handy for those of you who have embarrasing user names like Lou Briccant.

Visual Basic:
  1. Sub RemoveUserNames()
  2. Dim MyComment As Comment
  3. Dim I As Integer
  4.  
  5. 'Start looping through comments
  6.     For Each MyComment In ActiveSheet.Comments
  7.        
  8.     'Find the position number of the Colon & LineFeed character combination
  9.         I = InStr(1, MyComment.Shape.TextFrame.Characters.Text, ":" & vbLf)
  10.        
  11.     'Use the position number to reset the comment text to all but the user name
  12.         If I> 0 Then
  13.             MyComment.Shape.TextFrame.Characters.Text = _
  14.             Mid(MyComment.Shape.TextFrame.Characters.Text, I + 2)
  15.         End If
  16.        
  17. 'Go to the next comment
  18.     Next MyComment
  19.    
  20. End Sub

RELATED STUFF

  1. Mocking the ‘Merge & Center’ Icon
  2. VBE Tips I Wish I Knew 5 Years Ago
  3. Highlighting the Active Row and Column
  4. Why is Excel so Negative about Hiding Subtotals
  5. Why Replace the DOM Interface
  6. Running an Access Parameter Query from Excel
  7. Creating a Zoom Box in Excel
  8. Smart Scroll Bars in Excel
  9. Excel Zoom Box Font Size Follow Up
  10. Fun with Custom Lists
Advertisement

7 Responses

  1. Lou Briccant says:

    This will certainly help...thanks!

  2. Isaac Hunt says:

    me too!!!!

  3. Eric Shun says:

    me three!!!!

  4. Eva Brick says:

    Me four :-)

  5. jeff weir says:

    I used to think user names were a feature, because when I changed my username to God less people tended to argue with my comments.

    But recently, people have been commenting back with "which one". So now I'm converted, if you'll pardon the pun.

  6. amolin says:

    we avoid the annoyance by setting: Options-->General->Usename.

    If you have Usename in Comment, you can remove it by setting: Options-->Security-->Remove Personal information from file properties on save. User name in Comment wil change to "Author:"

Trackbacks/
Pingbacks

  1. Office links for April

Leave a Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

*

* Copy this password:

* Type or paste password here:

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>