Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
adding cell comment via VBA (bold font?)
Hi,
Is there a way to make part of a cell comment bold (user name in particular) when a comment is being added via VBA? Thanks, -- ______ Regards, Greg |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
adding cell comment via VBA (bold font?)
To change the comment text to bold:
ActiveCell.Comment.Shape.TextFrame.Characters.Font .Bold = True "Greg" wrote: Hi, Is there a way to make part of a cell comment bold (user name in particular) when a comment is being added via VBA? Thanks, -- ______ Regards, Greg |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
adding cell comment via VBA (bold font?)
how about only part of the comment?
for instant: John Smith: this cell has a comment -- ______ Regards, Greg "Anony" wrote: To change the comment text to bold: ActiveCell.Comment.Shape.TextFrame.Characters.Font .Bold = True "Greg" wrote: Hi, Is there a way to make part of a cell comment bold (user name in particular) when a comment is being added via VBA? Thanks, -- ______ Regards, Greg |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
adding cell comment via VBA (bold font?)
I'm using the Application.UserName here, but the principle's the same. Go by
character lengths: Sub FormatCmt() Dim Cmt As Comment Dim YourName As String Dim Text As String Text = "Here's your comment." With ActiveCell YourName = Application.UserName & ":" & vbLf Set Cmt = .AddComment(YourName & Text) With Cmt.Shape.TextFrame .Characters.Font.Bold = False .Characters(1, Len(YourName)).Font.Bold = True End With End With End Sub ----------------- Cheers, Anony |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
if font is bold then cell value is number | Excel Discussion (Misc queries) | |||
How to count number of Cell have Strike Through Effect & Bold as font style. | Excel Discussion (Misc queries) | |||
Can you keep a cells BOLD Font, cell color size | Excel Discussion (Misc queries) | |||
change font size and bold in cell? | Excel Programming | |||
Using bold and normal font within one cell | Excel Programming |