Insert Comment

  • Thread starter Thread starter Larry S
  • Start date Start date
L

Larry S

I want to insert a comment in an active cell that shows the username and the
word "ordered". I want the comment to be on two lines as shown:

username
ORDERED

Thanks,
Larry
 
Hi Larry,

I created this in XL2003:

Sub AddComment()
On Local Error Resume Next

ActiveCell.AddComment
ActiveCell.Comment.Text _
Text:=Application.UserName & _
vbNewLine & "ORDERED"
End Sub

HTH,

Wouter
 
Sub Macro1()
With ActiveCell
.AddComment
.Comment.Visible = False
.Comment.Text Text:=Application.UserName & Chr(10) & "ORDERED"
End With
End Sub
 
Back
Top