Removing User Name from Comments

March 8th, 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.

  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
Advertisement

9 comments

  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:”

  7. Jack Meoff says:

    Yes, very useful tips.

Leave a Reply