LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
ken ken is offline
external usenet poster
 
Posts: 21
Default "Comment" format anomaly

G'day there One & All,

I have a workbook where my users copy hyperlinks across from one sheet
to another. That works fine, as does the code that then builds a comment
from various cells in the first sheet to give a bit of a description of
what's in the hyperlinked document. That all works fine. What is driving
me nuts, however is that I can't format the comments from within my
calling procedure.

After hours of trial and error failed dismally, a web search found this
little snippet:

Public Sub ChangeCommentFormat()
For Each c In ActiveSheet.Comments
With c.Shape.TextFrame.Characters.Font
.Name = "Tahoma"
.Size = 10
.Bold = False
End With
c.Shape.TextFrame.AutoSize = True
Next
End Sub

It works well, but only if I run it with F5 from within the module.
I've tried calling it from the end of the procedure that builds and adds
my comments. I've called if from the worksheet_change event that calls
the comment building routine. I've tried adapting it to work on an
individual comment called, once again, from within the comment builder.
Nothing works and my comments are then written in bold font with too
small a shape to fit the text in. The above code works quickly and gives
the exact result, but I don't expect my clients to run it manually when
it should just be done each time a comment is inserted from my code.

Does anyone know why it works in this manner? Or does anyone have a
clue as to how to format comments on the fly? To date I've spent over 6
hours trying various methods and am still trying to get it to work.

Hoping someone has more clues than I do.
Thanks for listening
Ken McLennan
Qld Rosewood
 
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
Convert cell "contents" into a "comment" Ryan Excel Discussion (Misc queries) 4 October 3rd 08 11:34 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Excel VBA to convert "dd.MM.yy" text to "dd/MM/yyyy" format date? Paul J[_2_] Excel Programming 4 July 11th 07 11:32 AM
can you change the default format for a "comment" in excel? 24bwo Excel Discussion (Misc queries) 2 March 21st 07 12:10 AM
Scroll Bar missing "Control" tab in "Format Properties" dialog box Peter Rooney Excel Discussion (Misc queries) 5 August 24th 06 05:36 PM


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

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

About Us

"It's about Microsoft Excel"