The Font object contains information needed to format text for display in the interface of an application or for printed output.
Syntax
Font
Remarks
You frequently identify a Font object using the Font property of an object that displays text (such as a Form object or the Printer object).
You cannot create a Font object using code like Dim X As New Font
. If you want to create a Font object, you must use the StdFont object like this:
Dim X As New StdFont
If you put a TextBox control named Text1 on a form, you can dynamically change its font Font object to another using the Set statement, as in the following example:
Dim X As New StdFont
X.Bold = True
X.Name = "Arial"
Set Text1.Font = X