Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
I want to show all comments with same format to suit my design. I didn't find any choice in 'options', unfortunately. Anybody knowing a good way? What about the way below: I'm thinking of calling a 'reformat' sub from worksheet_selectionchange or _change like 'Call CommentFormat(Target)' to below Sub. I'm not sure of the object levels, I get error on ' With rng.Comment.ShapeRange.Font' and 'If Not rng.Comment Is Nothing Then' always passe code thorugh even then there is no comment etc. Sub Worksheet_SelectionChange(ByVal Target As Range) '************************** If TypeName(Target) = "Range" Then Call CommentFormat(Target) End if End sub Sub CommentFormat(rng As Range) '************************** If Not rng.Comment Is Nothing Then With rng.Comment.ShapeRange.Font .Name = "Arial Narrow" .FontStyle = "Normal" .Size = 10 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .ColorIndex = 1 End With rng.Comment.ShapeRange.Fill.Visible = msoTrue rng.Comment.ShapeRange.Fill.Solid rng.Comment.ShapeRange.Fill.ForeColor.SchemeColor = 51 rng.Comment.ShapeRange.Fill.Transparency = 0.3 rng.Comment.ShapeRange.line.Weight = 0.25 rng.Comment.ShapeRange.line.DashStyle = msoLineSolid rng.Comment.ShapeRange.line.Style = msoLineSingle rng.Comment.ShapeRange.line.Transparency = 0# rng.Comment.ShapeRange.line.Visible = msoTrue rng.Comment.ShapeRange.line.ForeColor.SchemeColor = 8 rng.Comment.ShapeRange.line.BackColor.RGB = RGB(255, 255, 255) With rng.Comment .Locked = True .LockedText = True End With End if End Sub (When I get this work, I intend to check each format and only change if it is false) Happy to all support, Kind regards Tskogstrom |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can I change the default font for a comment box in excel globally | Excel Discussion (Misc queries) | |||
How do you globally change format from upper to lower case In Mic. | Excel Discussion (Misc queries) | |||
Set Comment formats 'globally'? | Excel Discussion (Misc queries) | |||
How to globally replace a value and set a format. | Excel Discussion (Misc queries) | |||
How do I restore format cells menu? | Excel Discussion (Misc queries) |