The way I would do it, which isn't usually the most efficient is to use this code if you are using a command button to print the file:
Code:
Private Sub cmdPrint_Click()
  On Error GoTo errorline 'skip the commondialog code
  'your commondialog code here
  Exit Sub 'exit the sub incase they pressed OK
  errorline: 'declare the error line
  msgbox "You canceled the print command..." 'you can delete this msgbox code
                                             'and nothing will happen when the button
                                             ' is pressed, like most programs.
End Sub