View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Adding a comment to a cell in VBA?!

Are you sure the correct sheet is active?

Is that activesheet protected?

What else does the error message say?

Maury Markowitz wrote:

"Dave Peterson" wrote:

The first thought that hit me was that DestCPr and oCount didn't make a nice
address.


No, that's not it. The line immediately before it is identical with the
exception that it says .value = "10", which works fine.

The second thought was that that cell already had a comment in it.


This appears to be the problem. But the mystery simply deepens.

This is a brand new spreadsheet, created every day from scratch in the code.
No other code adds a comment, and in fact the sheet that's being worked on
didn't even exist 10 seconds earlier.

Maury


--

Dave Peterson