Disable Printing

J

JOHN SMITH

Hi,

I have a sheet that i need to be save it before it can be printing.

can we disable print? until the sheet has been saved it?

I have a nice button/macro that save, send and print the data on
this sheet but the user can print it anyways.

thnks
 
J

JOHN SMITH

Private Sub Workbook_BeforePrint(Cancel As Boolean)
MsgBox "Must Save Sheet!!!!"
Cancel = True
End Sub

thnks
 
D

Dave Peterson

Something like...

Option Explicit
Private Sub Workbook_BeforePrint(Cancel As Boolean)
If Me.Saved Then
'do nothing
Else
MsgBox "Must Save Workbook!!!!"
Cancel = True
End If
End Sub
 
Top