Font Members
Use the Font
object to change the appearance of text on a form, frame, or control. Use the Font
property of the form or control to get a reference to this object. The Font
object has the following members
:
Bold Italic Size StrikeThrough Underline Weight
The following code makes the text on a form’s controls bold:
Private Sub UserForm_Initialize( ) Dim c As Control For Each c In Me.Controls c.Font.Bold = True Next End Sub
Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.