Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
You can programmatically add and delete comments in Microsoft Office Excel worksheets. Comments can be added only to single cells, not to multi-cell ranges.
Applies to: The information in this topic applies to document-level projects and VSTO Add-in projects for Excel. For more information, see Features available by Office application and project type.
The following examples assume that there is a single-cell NamedRange control named dateComment
on a worksheet named Sheet1
.
Call the AddComment method of the NamedRange control and supply the comment text. This code must be placed in the Sheet1
class.
Verify that a comment exists on the range and delete it. This code must be placed in the Sheet1
class.
The following examples assume that there is a single-cell Range named dateComment
on the active worksheet.
Call the AddComment method of the Range and supply the comment text.
Verify that a comment exists on the range and delete it.
Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!