Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excel VBA: function to turn activecell to bold

Tags:

People also ask

How do I make cell contents bold in VBA?

Go to "replace" (top right). Type the word you want to make bold into the "Find what:" field and the same into the "Replace with:" field, then when you are on the "Replace With:" box press CTRL B. You should see "Format: Font: Bold" appear beneath it. Click Replace All and you should see all the targeted words go bold.


I have the following function inside my module.

Function Colorize(myValue)
    ActiveCell.Select
    Selection.Font.Bold = True
    Colorize = myValue
End Function

The cell that will use this function should be turning bold - however, I get no error messages back and sad but true, its not turning bold. What am I missing?

Thanks