Excel Comments | How to Format many at one time

C

cardosol

Hello,

Can I set defaults to comments for them to act in a specific way?

For example, I want the default of a comment for the properities to 'Move
and Size with Cells' automatically. currently they are defaulted to 'Dont
Move and size with cells."

I have a workbook which has many comments and I am trying to hide rows and
columns but because I have one comment not formatted correctly, the rows will
not hide. I want to make sure that in the future I do not have to go through
a spreadsheet and make sure that all the comments are formatted correctly.
 
G

Gord Dibben

With some revision to code by Debra Dalgleish...............

Sub FormatAllComments()
Dim ws As Worksheet
Dim cmt As Comment
For Each ws In ActiveWorkbook.Worksheets
For Each cmt In ws.Comments
With cmt.Shape
.Placement = xlMoveAndSize
End With
Next cmt
Next ws
End Sub

For more Comments coding see Debra's site at

http://www.contextures.on.ca/xlcomments03.html


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top