Share via


Visual Basic Reference

FontChanged Event

See Also    Example    Applies To

Occurs when a property of a stdFont object changes at run time.

Syntax

Private Sub object_FontChanged(ByVal PropertyNameAs String)

The FontChanged event syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.
PropertyName A string returning the name of the stdFont object property that has changed. Possible values include Bold, Italic, Name, and Size.

Remarks

The FontChanged event will occur only if the stdFont object is declared using the WithEvents keyword and only for the stdFont object. An object declared as Font rather than as stdFont cant use the WithEvents keyword and will cause an automation error. The FontChanged event is primarily useful for User controls.