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

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Microsof...', 1758207714, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Microsoft/Office/Excel/helpers/insertComment(63): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78