Insert Comment

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
 
R

RadarEye

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
 
G

Gary''s Student

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top