In Excel, while preparing reports for boss/management, we tend to insert comments in order to let the other person inform the status of the task. Comments are basically used for internal purpose. In this article, we will learn how to remove all comments in Excel, using macros.
Question): I would like to apply a VBA code that will remove all the comments from workbook.
I am using Excel 2003 version at my home & Excel 2010 version at office. I have a code that is perfectly running in deleting Excel 2010 comments but not able to delete Excel 2003 comments.
We need to follow the below steps:
The following code is compatible with Excel 2007, Excel 2010 & Excel 2013 version
Sub Remove_Comments_After2007()
' Remove Comments from Excel 2007 Workbook
ActiveWorkbook.RemoveDocumentInformation (xlRDIComments)
End Sub
The following code is compatible with Excel 2003 version
Sub Remove_Comments_2003()
' Remove Comments from Excel 2003 Workbook
Dim wksAs Worksheet
Dim cmnt As Comment
For Each wksInActiveWorkbook.Sheets
For Each cmntInwks.Comments
cmnt.Delete
Next cmnt
Next
End Sub
In this way, we can delete Excel comments depending on the versions we are using.
The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.
Wow, this article is fastidious, my younger sister is analyzing these kinds of things, thus I am going to convey her. dgddkkgedckkgack