View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Sub to write another result dimension into comments over formu

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