Question about Comments

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
 
S

stefan onken

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
 
K

kirkm

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 :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top