Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21096

PrintForm- runtime error: VB6

$
0
0
The following pertains to the code which I wrote for printing a form. Being a very basic application, I used the PrintForm function.

----------
Private Sub cmdprint_Click()
If MsgBox("This will print the report. Make sure your printer is ready and confirm.", vbOKCancel, "Confirm") = vbOK Then

' The visibility of objects in the form is controlled.

Printer.Orientation = vbPRORLandscape
Printer.PaperSize = vbPRPSA4
lbltime.Caption = Format(Now(), "DD/MM/YYYY, HH:MM:SS")
Form3.PrintForm

' The visibility control on objects is released and normalized.

End If
End Sub
----------

This works fine. However, if the PRINT command is given another time without form reload, I get an error "486: Can't print form image to this type of printer."

I would appreciate any help. Thanks :)

Viewing all articles
Browse latest Browse all 21096

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>