Skip to content

VBA Bold

Associated Files Download Links

You can use VBA in order to make text in cells bold. In this tutorial, you will learn how to make text bold.

Bold Text With VBA

You would set the Font.Bold Property of the Font Object to True in order to make text in a cell bold. The following code will make the text in cell A1 bold:

The result is:

Making Text Bold in VBA

The above example used the Range Object in conjunction with the Font Object. You can also use the Cell Object in conjunction with the Font Object in order to refer to the cell of interest. The following code will make the text in Cell C2 bold:

Clearing Bold With VBA

You would set the Font.Bold Property of the Font Object to False in order to make bold text in a cell the normal font weight. The following code will make bold text in cell A1, the normal font weight:

Remove All Formatting With VBA

You can also remove all formatting from a single cell or cells in your worksheet including the bold font weight, using the .ClearFormats method. The following code will remove all formatting from all the cells in a worksheet and as a result, bold text will be changed into the normal font weight:

 

You may also like some of this related content...

Advertisements
Automate Excel
Left Menu Icon