I have had good luck using the following with an iamge control, a picture box whould work same.<br>
<br>
Private Sub mnuFilePrint_Click()<br>
<br>
On Error GoTo err_handler<br>
'enable cancel button<br>
CommonDialog1.CancelError = True<br>
'disable print to file checkbox<br>
CommonDialog1.Flags = &H80000 <br>
CommonDialog1.ShowPrinter<br>
'place graphic on printer object<br>
Printer.PaintPicture frmImage.Image1.Picture, 10, 10<br>
'chase image from printer object to printer<br>
Printer.EndDoc<br>
GoTo done:<br>
<br>
err_handler:<br>
If Err.Number = 32755 Then GoTo done: 'user pressed cancel<br>
MsgBox (Err.Number & " " & Err.Description)<br>
<br>
done:<br>
<br>
End Sub<br>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.