Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Programmatically Edit Comment

Status
Not open for further replies.

philipose

Programmer
Dec 24, 2003
137
US
Hi Folks,
Do any of you have a clue how to programmatically click the "Edit Comment" of a cell? I want the user be able to type the comment in the Comment Box after running that line(s) of code.
Thanks
Philipose
 
could you flash an input box and then write the value of it to the comment in a range?

ie

strcomment = InputBox("Please Write your_ Comment", "Comment")
If IsNull(strcomment) Or strcomment = "" Then
Exit Sub
End If
Range(YourRange).Comment.Text (strcomment)
this would change a comment on a specific range however will cause an error if there isnt a comment added in which case you will need to add it.

hope that sort of gets round what your looking to achieve.

Scott.

Leadership and learning are indispensable to each other.
John F. Kennedy November 22 1963
 
Hi,
xuereveds' suggestion is good, but is not what i'm looking for. This is the action(given below) I have assigned if I click on a Custom Insert Item Menu, which avoids putting the name of the user. If I dont include ActiveCell.Comment.Visible = False it will be similar to a Show Comment.

If ActiveCell.NoteText = "" Then
ActiveCell.AddComment (" ")
ActiveCell.Comment.Visible = False
End If

I was looking to check how get the same look as the Edit Comment.
Thanks
Philipose
 
I think this should work.
SendKeys "%ie~"
Thanks
Philipose
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top