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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top