PrintForm method

Sends a bit-by-bit image of a UserForm object to the printer.

Syntax

object.PrintForm

The object placeholder represents an object expression that evaluates to an object in the Applies To list. If object is omitted, the UserForm with the focus is assumed to be object.

Remarks

PrintForm prints all visible objects and bitmaps of the UserForm object. PrintForm also prints graphics added to a UserForm object.

The printer used by PrintForm is determined by the operating system's Control Panel settings.

Example

In the following example, the client area of the form is printed when the user clicks the form.

' This is the click event for UserForm1
Private Sub UserForm_Click()
    UserForm1.PrintForm
End Sub

See also

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.