Comments

  • Thread starter Thread starter Christopher Weaver
  • Start date Start date
C

Christopher Weaver

I would like the user to be taken to a new comment, or the existing one, of
the currently selected cell. I can get a new comment inserted

With Selection
.AddComment
.Comment.Visible = False
.Comment.Text Text:=""

End With


but I can't get the cursor to end up inside the comment, awaiting the user's
input.

Any ideas?

Thanks.
 
Thank you, that's exactly what I was looking for.

BTW, what does "%ie~" refer to in the SendKeys?
 
Would an InputBox work for you?
(This does not use a Set variable)

Sub Demo()
With ActiveCell
If .Comment Is Nothing Then
.AddComment InputBox("Enter text for Comment")
.Comment.Shape.TextFrame.AutoSize = True
End If
End With
End Sub
 
Thank you again. This is very valuable information. As you can see, I'm
really new at this. I'm finding the help text not well organized for my
purposes. I hope you all will tolerate my questions.
 
OK, this is the kind of thing that makes me nuts! It worked, really it did,
and now it doesn't. The part that's failing, oddly, is the part that I
didn't understand in the first place: SendKeys "%ie~". The comment is
created but never does the edit comment happen.

Any ideas on this?
 
A correction to my most recent post within this branch of this thread:

This code works fine when invoke through Alt-F8, etc. It fails when I
invoke it with a CTRL-key shortcut key that I defined in the Options dialog
box within the macros dialog box.
 
Back
Top