Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Comment bug ?

I have a worksheet that has a number of comments scattered all over.

I'm using the default 'Edit Comment' Excel function to build them all.

I set the size manually cropping all the extraneous space so the area of the
comment is only aruond the text I want.

Thinking that I'm done, I continue doing development, modifying macros for
other sections. However, when I come back to some of the cells that I've
inserted comments for, I notice that the comment field grows, esp if after
i've 'corrected' the size of the comment field, I write a value to the cell.


Is there any way I can fix the size of the comment field so that it will
keep from doing this ? Or do I have to write a custom macro / form to handle
this ?

Thanks,
Chad


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Comment bug ?

Several of my users have complained about similar problems. Comments are
formatted and then some "evil force" changes them. The following is a
technique to un-do the actions of the "evil force":

1. after formatting the comments, create and run a macro to read the
dimensions of each comment and store them in a public array.

2. create another macro to read the public array and apply the dimensions to
each comment

If the "evil force" attacks, you just run the second macro to re-establish
the dimensions of each comment. The following is an example of how to read
(or write) comment dimensions:


Sub readum()
Dim c As Comment
For Each c In ActiveSheet.Comments
x = c.Shape.Width
y = c.Shape.Height
MsgBox (x & " by " & y)
Next
End Sub

--
Gary's Student


"ChadF" wrote:

I have a worksheet that has a number of comments scattered all over.

I'm using the default 'Edit Comment' Excel function to build them all.

I set the size manually cropping all the extraneous space so the area of the
comment is only aruond the text I want.

Thinking that I'm done, I continue doing development, modifying macros for
other sections. However, when I come back to some of the cells that I've
inserted comments for, I notice that the comment field grows, esp if after
i've 'corrected' the size of the comment field, I write a value to the cell.


Is there any way I can fix the size of the comment field so that it will
keep from doing this ? Or do I have to write a custom macro / form to handle
this ?

Thanks,
Chad


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 205
Default Comment bug ?

Just to add that I've also found this to be a problem. I've used something
similar to Gary's change all comments, but I suspect the my particular "evil
force" coinsides with Autofilter hiding and then unhiding rows (not in every
case but just occasionally!) If you don't have too many comments then you
could run the resize macro after every autofilter, but you'd need to check
the performance hit on this and decide whether its worth it.

Best regards

John


"Gary''s Student" wrote in message
...
Several of my users have complained about similar problems. Comments are
formatted and then some "evil force" changes them. The following is a
technique to un-do the actions of the "evil force":

1. after formatting the comments, create and run a macro to read the
dimensions of each comment and store them in a public array.

2. create another macro to read the public array and apply the dimensions
to
each comment

If the "evil force" attacks, you just run the second macro to re-establish
the dimensions of each comment. The following is an example of how to
read
(or write) comment dimensions:


Sub readum()
Dim c As Comment
For Each c In ActiveSheet.Comments
x = c.Shape.Width
y = c.Shape.Height
MsgBox (x & " by " & y)
Next
End Sub

--
Gary's Student


"ChadF" wrote:

I have a worksheet that has a number of comments scattered all over.

I'm using the default 'Edit Comment' Excel function to build them all.

I set the size manually cropping all the extraneous space so the area of
the
comment is only aruond the text I want.

Thinking that I'm done, I continue doing development, modifying macros
for
other sections. However, when I come back to some of the cells that I've
inserted comments for, I notice that the comment field grows, esp if
after
i've 'corrected' the size of the comment field, I write a value to the
cell.


Is there any way I can fix the size of the comment field so that it will
keep from doing this ? Or do I have to write a custom macro / form to
handle
this ?

Thanks,
Chad




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Comment bug ?

Ok ... so I should write something akin to your detect / store comment sizes
into a public array on a Workbook_Open event and then on a Worksheet_Change
event, do a sanity check to re-size them ??

Sounds like the most painless way to go ... I got something like 30 odd
comments ..



"John" wrote:

Just to add that I've also found this to be a problem. I've used something
similar to Gary's change all comments, but I suspect the my particular "evil
force" coinsides with Autofilter hiding and then unhiding rows (not in every
case but just occasionally!) If you don't have too many comments then you
could run the resize macro after every autofilter, but you'd need to check
the performance hit on this and decide whether its worth it.

Best regards

John


"Gary''s Student" wrote in message
...
Several of my users have complained about similar problems. Comments are
formatted and then some "evil force" changes them. The following is a
technique to un-do the actions of the "evil force":

1. after formatting the comments, create and run a macro to read the
dimensions of each comment and store them in a public array.

2. create another macro to read the public array and apply the dimensions
to
each comment

If the "evil force" attacks, you just run the second macro to re-establish
the dimensions of each comment. The following is an example of how to
read
(or write) comment dimensions:


Sub readum()
Dim c As Comment
For Each c In ActiveSheet.Comments
x = c.Shape.Width
y = c.Shape.Height
MsgBox (x & " by " & y)
Next
End Sub

--
Gary's Student


"ChadF" wrote:

I have a worksheet that has a number of comments scattered all over.

I'm using the default 'Edit Comment' Excel function to build them all.

I set the size manually cropping all the extraneous space so the area of
the
comment is only aruond the text I want.

Thinking that I'm done, I continue doing development, modifying macros
for
other sections. However, when I come back to some of the cells that I've
inserted comments for, I notice that the comment field grows, esp if
after
i've 'corrected' the size of the comment field, I write a value to the
cell.


Is there any way I can fix the size of the comment field so that it will
keep from doing this ? Or do I have to write a custom macro / form to
handle
this ?

Thanks,
Chad





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Comment bug ?

I know this is an old topic, but if someone is tracking down this bug
like I was, you may find it useful.

I've seen the "evil force" activated when adding and/or deleting rows.
Today I found all of my carefully sized comments messed up after
adding some rows.

If using "Freeze Panes", this also affects the appearance of comments
that straddle the frozen line(s).

It looks like I'll be resorting to the "code clamp" - forcibly
restoring comment size and location in code.

FWIW...
tbone
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Comment Marce Excel Discussion (Misc queries) 1 March 24th 08 02:25 AM
copy comment content to cell content as data not as comment Lilach Excel Discussion (Misc queries) 2 June 21st 07 12:28 PM
How can I edit a comment w/o first having to select Show Comment Mary Ann Excel Discussion (Misc queries) 1 August 26th 05 12:34 AM
How do I insert a comment when the Insert:Comment menu is greyed? none Excel Discussion (Misc queries) 0 May 19th 05 12:36 AM
a comment plugin & copy paste directly from excel to comment ? fr. RFM Excel Worksheet Functions 0 December 1st 04 11:29 PM


All times are GMT +1. The time now is 09:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"