ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Set Comment formats 'globally'? (https://www.excelbanter.com/excel-discussion-misc-queries/139051-set-comment-formats-globally.html)

tskogstrom

Set Comment formats 'globally'?
 
Hi,
I want to have all my comments to look the same regarding

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
End If


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 Sub



All times are GMT +1. The time now is 11:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com