A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Hi AceGreen
did it work?
I have to deal with this theme again just in this week because of an other problems in my repair-procedure. I tried again and found out, that reproducable a sheet gets corrupt, if you delete a line with a comment (not every line, but special ones... ) In my case the line was the last, but the comment number was not the last. The comments seem to be numbered automatically after their creation.
I found out, that the picture-renaming-routine I posted before was not working in this case.
In my bigger repair-procedure (which does much more) I isolated that one repair was sufficient to stop corrupting my testfile.
In this procedure I change the top position of the comment shape. It is not enough to set shape.name = shape.name (I though maybe any writing into the comments may repair them, it does not. ) But this one seems to work (again in the Workbook_close event)
If you try this, I would be glad for a comment (working/not working).
Thx Thomas
Dim objcomment As Comment
' run thru all comments
For Each objcomment In ActiveSheet.Comments
With objcomment.shape
With .Shape
.top = objcomment.Parent.top
End With
.Visible = False
End With
Next
The comments loose their top position, if you make them visible by code. e.g.
ActiveSheet.Cells(ActiveCell.Row, kommentarspalte).Comment.Visible = True
so my repair function is necessary anyway. The position onmouseOver is ok.