stop printing

G

gweigel

How do you create a generalized speedsheet, that will stop printing at a certain cell reference date.
 
F

Frank Kabel

Hi
not quite sure but you may try putting the following code in workbook
module (not in a standard module):


Private Sub Workbook_BeforePrint(Cancel As Boolean)
If Me.Worksheets("sheet1").Range("A1").Value < Date Then
Cancel = True
End If
End Sub

This tests cell A1 of sheet1.

Note: This is not bullet-proof as the user can disable macros.
 
Top