Hide a comment

How to hide a comment using the Excel and VBA methods

METHOD 1. Hide a comment using cell option

EXCEL

Right-click on a cell > Click Hide Comment

1. Right-click on the cell that has the comment that you want to hide.
2. Click Hide Comment.
Note: in this example we are hiding a comment in cell B2.
Right-click on a cell and click Hide Comment

METHOD 2. Hide a comment using ribbon option

EXCEL

Select the cell > Review tab > Comments group > Click Hide Comment

1. Select the cell that has the comment that you want to hide.
Note: in this example we are hiding a comment in cell B2.
Select a cell in which to hide comment

2. Select the Review tab. Select the Review tab

3. Click Show/Hide Comment in the Comments group. Click Show/Hide Comment

METHOD 1. Hide a comment using VBA

VBA

Sub Hide_Comment()
'hide a comment in cell ("B2")

Worksheets("Analysis").Range("B2").Comment.Visible = False

End Sub

OBJECTS
Worksheets: The Worksheets object represents all of the worksheets in a workbook, excluding chart sheets.
Range: The Range object is a representation of a single cell or a range of cells in a worksheet.
PREREQUISITES
Worksheet Name: Have a worksheet named Analysis.

ADJUSTABLE PARAMETERS
Cell in which to hide a comment: Select the cell in which to hide a comment by changing the cell reference ("B2") in the VBA code to any cell in the worksheet that has a comment.
Worksheet Selection: Select the worksheet in which you want hide a comment by changing the Analysis worksheet name, in the VBA code, to any worksheet in the workbook.

Explanation about how to hide a comment

EXPLANATION

EXPLANATION
This tutorial explains and provides step by step instructions on how to hide a comment using the Excel and VBA methods.

Excel Methods: Using Excel you can hide a comment in the selected cell with the ribbon option or cell option.

VBA Methods: Using VBA you can hide a comment in a cell that has been specified in the VBA code.