Hi, I have some VBA code which loops through data in a spreadsheet and depending on a set of criteria, adds comments to each cell if appropriate. This works well and the code works. However, after a certain number of cells, the code returns an error 91 when trying to execute:
currentcell.comment.add
I can't think of why this would break after thousands of comments added using the same code and in fact, if I delete some data, then the code can run past the cell where the last error occurred (and so it's not breaking at the same place each time).
And so the only thing I can think of is if there's a maximum number of comments that can be in a spreadsheet, but I can't seem to find any documentation of this.
Any ideas?
Thanks,
Hammer8
then maybe some other limit.
http://office.microsoft.com/en-gb/excel-help/excel-specifications-and-limits-HP010342495.aspx