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

I have created a file that will be used by many "non computer" types.
I would like to create a macro that will select the current cell,
"Insert Comment", then wait for the user to input the comment. When
the user selects ENTER, The macro would then to to the next cell.

Additionally, I would not like any text in the comment box, when the
user is prompted for the text. I think Excel defaults to the username:

Thanks in advance.

Jo

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

I'm assuming that you know how to place a button ont o a worksheets. Here's
the code to put behind it.

Sub vbutton()
Dim strComments As String
strComments = InputBox("Please enter your comments")

ActiveCell.AddComment
ActiveCell.Comment.Visible = False
ActiveCell.Comment.Text Environ$("USERNAME") & Chr(10) & "Jimbo"
ActiveCell.Offset(1, 0).Select 'Moves to the cell below the activecell.
If you
'want to move to the cell to the right, use Activecell.Offset(0,1).Select
End Sub

I know it's not quite what your looking for but it might be ok!?

Thanks
James Nicholls





"wojo" wrote:

I have created a file that will be used by many "non computer" types.
I would like to create a macro that will select the current cell,
"Insert Comment", then wait for the user to input the comment. When
the user selects ENTER, The macro would then to to the next cell.

Additionally, I would not like any text in the comment box, when the
user is prompted for the text. I think Excel defaults to the username:

Thanks in advance.

Jo


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
Macro-insert text(personal comment) puiuluipui Excel Discussion (Misc queries) 2 September 24th 09 09:45 PM
Insert comment to Cell ManhattanRebel Excel Discussion (Misc queries) 1 January 10th 09 01:09 PM
macro to insert a comment driller Excel Worksheet Functions 0 February 8th 07 10:22 PM
How can I insert an image inside a comment of a cell? Javigir Excel Discussion (Misc queries) 1 February 1st 07 12:03 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 03:31 PM.

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

About Us

"It's about Microsoft Excel"