startprint() error
startprint() error
When I call the startprint("", true) to display the printer select dialog and cancel out of the printer select, I get an error. Do you have anything built in to trap this error? This function does not return anything, maybe it should?
-
- Posts: 21
- Joined: Mon Feb 12 2007
- Contact:
Unable to catch error when cancel button is clicked
I am using following code to print the current page but I am unable to catch the error when Cancel button is clicked on Print Dialog. The contol never reaches to ErrorHandler.
Please help me out as i dont want to application to crash
With PDFCreactiveX1
On Error GoTo ErrorHandler
.StartPrint "", True
.PrintPage .CurrentPage
.ClearPage .CurrentPage
.EndPrint
End With
Exit Sub
ErrorHandler:
Err.Raise Err.Number, Err.Source, Err.Description
Err.Number
Please help me out as i dont want to application to crash
With PDFCreactiveX1
On Error GoTo ErrorHandler
.StartPrint "", True
.PrintPage .CurrentPage
.ClearPage .CurrentPage
.EndPrint
End With
Exit Sub
ErrorHandler:
Err.Raise Err.Number, Err.Source, Err.Description
Err.Number
Anshuman
Hello Anshuman,
I replied to your original post in this forum http://www.amyuni.com/forum/viewtopic.php?t=2123
hope this helps.
I replied to your original post in this forum http://www.amyuni.com/forum/viewtopic.php?t=2123
hope this helps.
-
- Posts: 21
- Joined: Mon Feb 12 2007
- Contact:
Unable to catch error when cancel button is clicked
I am able to catch the unhandled error.
It was VB IDE settings which was not allowing the error to be handled
It was VB IDE settings which was not allowing the error to be handled
Anshuman