Oops.
You could have used:
Application.Caller.AddComment Text:=myStr
But more importantly, fix this line, too.
from:
Application.Caller.Offset(0, -1).Comment.Delete
to:
Application.Caller.Comment.Delete
That's the line that deletes the existing comment, so the .addcomment won't blow
up.
Max wrote:
"Dave Peterson" wrote:
How about dumping the =countif()
and using a UDF that does both of the work.
Superb, Dave! Many thanks. Runs great!
I tweaked the OFFSET in this line a little <g
to get the comment to appear over the formula cells:
Application.Caller.Offset(0, 0).AddComment Text:=myStr
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
--
Dave Peterson