Excel 2010: .VBA Code for Bolding Text

I have a macro that uses "vbred" color to highlight items in my spreadsheet.  Is there a way to bold this?   i.e. "vbred bold"  Thanks.
itsmevicAsked:
Who is Participating?
 
redmondbCommented:
itsmevic,

For Each matchResult In matches
                    ' highlight
                    If isHighlight Then
                        cell.Characters(matchResult.FirstIndex + 1, matchResult.Length).Font.Color = vbGreen
                        cell.Interior.Color = vbYellow
                        cell.Font.Bold = True
                    End If

Open in new window

Regards,
Brian.
0
 
Shanan212Commented:
Considering your items are selected prior to coloring them

Selection.Font.Bold = True

Open in new window

0
 
Martin LissOlder than dirtCommented:
Just add


    Range.Font.FontStyle = "Bold"
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
redmondbCommented:
Hi, itsmevic.

myCell.Font.Bold = True

Regards,
Brian.
0
 
itsmevicAuthor Commented:
Here's the portion of my code that specifies what color.  Where would I need to add the change at to make this work?

For Each matchResult In matches
                    ' highlight
                    If isHighlight Then
                        cell.Characters(matchResult.FirstIndex + 1, matchResult.Length).Font.Color = vbGreen
                        cell.Interior.Color = vbYellow
                    End If

Open in new window

0
 
Martin LissOlder than dirtCommented:
After line 5
cell.Font.FontStyle = "Bold"
0
 
Shanan212Commented:
Try this

For Each matchResult In matches
                    ' highlight
                    If isHighlight Then
                        activecell.Characters(matchResult.FirstIndex + 1, matchResult.Length).Font.Color = vbGreen
                        ActiveCell.Font.Bold = True
                    End If 

Open in new window

0
 
itsmevicAuthor Commented:
Awesome input from all.  Thank you!
0
 
Martin LissOlder than dirtCommented:
You're welcome and I'm glad I was able to help.

Marty - MVP 2009 to 2012
0
 
redmondbCommented:
Thanks, itsmevic!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.