Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Insert Comment


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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default Insert Comment

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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Insert Comment


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

--
Gary''s Student - gsnu200819
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Insert Comment


Thanks Gary. Works perfectly.

"Gary''s Student" wrote:

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

--
Gary''s Student - gsnu200819

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert Comment PL Excel Discussion (Misc queries) 1 March 12th 10 07:07 AM
Insert Comment Carl R[_2_] Excel Discussion (Misc queries) 1 September 25th 09 02:02 AM
Insert Comment PL Excel Discussion (Misc queries) 3 July 27th 09 08:10 AM
Insert Comment PL Excel Discussion (Misc queries) 3 June 15th 09 01:13 PM
How do I insert a comment when the Insert:Comment menu is greyed? none Excel Discussion (Misc queries) 0 May 19th 05 12:36 AM


All times are GMT +1. The time now is 06:01 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"