View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Sean Sean is offline
external usenet poster
 
Posts: 454
Default Cancel Printing Except Q

I have the following code which prevents priniting of a document. Would
it be possible to allow printing if the correct password was entered
within a userform? So on clicking the Print Icon an input box which
required the password would appear, if it is correct, document prints,
if it isn't document doesn't. If so how would I do it?

Thanks

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Cancel = True
End Sub