|
-
Jun 5th, 2010, 02:32 PM
#1
Thread Starter
Lively Member
[RESOLVED] simple print cancel question
I'm sorry for asking such a simple question. I know the answer is so simple I just can't find it on the net and tired of looking for it. I'm using the commondialog in VB6 and when i hit cancel it still prints the page but it also brings up the error handler message so i know it's throwing the error. I just can't seem to get it to not print.
On Error GoTo cancel_error
If Text50.Text > "0" Then
priForm1.Show
priForm1.Text3.Text = Text51(0).Text
priForm1.Text4.Text = Text51(1).Text
priForm1.Hide
CommonDialog1.ShowPrinter
CommonDialog1.CancelError = True
priForm1.PrintForm
Unload priForm1
End If
cancel_error:
If Err.Number <> cdlCancel Then
MsgBox "Printing Canceled", vbOKOnly
End If
Thank you guys
-
Jun 5th, 2010, 02:44 PM
#2
Re: simple print cancel question
Swap these 2 lines. Set the flag before showing the printer:
CommonDialog1.ShowPrinter
CommonDialog1.CancelError = True
-
Jun 5th, 2010, 03:15 PM
#3
Thread Starter
Lively Member
Re: simple print cancel question
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|