Comments

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.
 
C

Christopher Weaver

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

BTW, what does "%ie~" refer to in the SendKeys?
 
D

Dana DeLouis

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
 
C

Christopher Weaver

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.
 
C

Christopher Weaver

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?
 
C

Christopher Weaver

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.
 

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