Microsoft Office Tutorials and References
In Depth Information
Removing an Add-In from the Add-Ins List
From the menu bar in the VBE, click Insert ➪➤ Module. Copy the following User Defined
Function into the module:
Function GetComment(rng As Range) As String
Dim strText As String
If rng.Comment Is Nothing Then
strText = “No comment”
strText = rng.Comment.Text
GetComment = strText
Press the Ctrl+S keys to display the Save As dialog box. Navigate to the folder into which
you want to save this file. Name the file CommentText and select Excel Add-In in the Save
As Type field, as indicated in Figure 22-17. Click the Save button, which will convert this
workbook as a new add-in file named CommentText.xlam .
Restart Excel and open a new workbook.
Right-click cell B2 of the active worksheet, and select Insert Comment. Enter some text in
Select cell G1.
Press Alt+TI to show the Add-Ins dialog box.