Search notes:

Excel helpers: insert a comment

The following macro inserts a comment in the currently selected cell and opens it so that the usual right mouse click after inserting a comment is not necessary.
'
'  Assign Alt-C to the macro:
'     application.onKey "%c", "insertComment"
'
sub insertComment() ' {

    dim cmt as comment

    set cmt = selection.addComment

    cmt.visible = true
    cmt.text text := ""

  '
  ' Select the comment so that it's possible
  ' to type-write into it right away:
  '
    cmt.shape.select true

end sub ' }
Github repository about-Excel, path: /helpers/insertComment.bas

See also

Show/hide comments with a mouse click
Excel helpers

Index