Skip to main content

Font object

Table of contents
  1. Remarks
  2. Example

Contains the font attributes (font name, font size, color, and so on) for an object.

Remarks

If you don't want to format all the text in a cell or graphic the same way, use the Characters property of the Range object to return a subset of the text.

Example

Use the Font property to return the Font object. The following example formats cells A1:C5 as bold.

Worksheets("Sheet1").Range("A1:C5").Font.Bold = True

Leave a comment

Your email address will not be published. Required fields are marked *

Format your code: <pre><code class="language-vba">place your code here</code></pre>