p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

  Return to Index  

beginning_vb thread: Print Dialog

Message #1 by "Phil Feinberg" <phil@b...> on Mon, 12 Jun 2000 21:46:24
I thought it would be pretty straight forward to use the Print Dialog but I 

am having a problem with the CANCEL function.

I set commondialog1.cancelerror = True but I still get an error 32755 

saying the the cancel button was pressed. I know that!  I thought that this 

was supposed to catch that press and not give an error?

If i set Cancelerror to be False, it prints whether OK or Cancel is 


Here is the code:

Private Sub SubPrint()


   CommonDialog1.CancelError = True


    On Err GoTo Dialog_Error







Exit Sub


    If cdlCancel Or Err.Number = 32755 Then

        MsgBox " cancelled print"


        Exit Sub

    End If

End Sub

Thanks for any help.


  Return to Index