Question about Comments

  • Thread starter Thread starter kirkm
  • Start date Start date
K

kirkm

Is it possible to BOLD the first line only (in a comment)
by code ? ( I can do it manually).

I have variables holding the row and column and have confirmed
a comment does exist in that cell.

Thanks - Kirk
 
hi Kirk,
try this code

Sub BoldFirstLineOfComment()
With Range("A1").Comment
l = InStr(.Text, Chr(10))
..Shape.TextFrame.Characters(1, l).Font.Bold = True
End With
End Sub

you can use SpecialCells(xlCellTypeComments), if you want to change
all comments in a sheet.

stefan
 
Sub BoldFirstLineOfComment()
With Range("A1").Comment
l = InStr(.Text, Chr(10))
.Shape.TextFrame.Characters(1, l).Font.Bold = True
End With
End Sub

Many thanks indeed. Works spot on !

Cheers - Kirk

PS This thing I'm doing just about makes the tea & toast Now :)
 
Back
Top