ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   select all comments (https://www.excelbanter.com/excel-discussion-misc-queries/93458-select-all-comments.html)

Pamela

select all comments
 
How do you "select all comments" in a worksheet or workbook? Does anyone
have the VBA code for this?

Pam

Dave Peterson

select all comments
 
Do you mean select all the cells that have comments in them?

if yes,

Option Explicit
Sub testme02()
Dim myRng As Range

With ActiveSheet
Set myRng = Nothing
On Error Resume Next
Set myRng = .Cells.SpecialCells(xlCellTypeComments)
On Error GoTo 0

If myRng Is Nothing Then
MsgBox "No cells with comments"
Else
myRng.Select
End If
End With
End Sub

Manually, you can select a single cell
edit|goto|special|check comments and click ok.

Pamela wrote:

How do you "select all comments" in a worksheet or workbook? Does anyone
have the VBA code for this?

Pam


--

Dave Peterson


All times are GMT +1. The time now is 04:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com