silentwolf
Well-known Member
- Joined
- May 14, 2008
- Messages
- 1,216
- Office Version
- 2016
Hi guys,
just wondering for a error handler so I can cancel the print dialog .
could someone let me know how I can use the error handler when I cancel the printdialog.
Many thanks
Albert
just wondering for a error handler so I can cancel the print dialog .
Code:
Private Sub cmdRptStunden_Click()
Dim stDocName As String
stDocName = "rptObjektStunden"
DoCmd.OpenReport stDocName, acPreview
DoEvents
DoCmd.RunCommand acCmdZoom100 '100% einstellen, falls gewünscht
DoEvents
If MsgBox("Print", vbYesNo) = vbYes Then
DoCmd.RunCommand acCmdPrint 'Printdialog
Else
DoCmd.Close acReport, stDocName
End If
End Sub
could someone let me know how I can use the error handler when I cancel the printdialog.
Many thanks
Albert