I want to print ONE form, only ONE form. I want only printed what is visible on that form. How do I do this.
Printable View
I want to print ONE form, only ONE form. I want only printed what is visible on that form. How do I do this.
You coul use:
PRINT FORM METHOD
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 Form with the focus is assumed to be object.
Remarks
PrintForm prints all visible objects and bitmaps of the Form object. PrintForm also prints graphics added to a Form object or PictureBox control at run time if the AutoRedraw property is True when the graphics are drawn.
The printer used by PrintForm is determined by the operating system's Control Panel settings.
Examples:
This example uses the PrintForm method to print the current form. To try this example, paste the code into the Declarations section of a form. Place on the form any controls you want to see on the printed form, and then press F5 and click the form.
This is straight from help.Code:Private Sub Form_Click ()
Dim Msg ' Declare variable.
On Error GoTo ErrorHandler ' Set up error handler.
PrintForm ' Print form.
Exit Sub
ErrorHandler:
Msg = "The form can't be printed."
MsgBox Msg ' Display message.
Resume Next
End Sub
------------------
Boothman
Quote:
There is a war out there, and it is about who controls the information, it's all about the information.