You can use the BeforePrint event procedure to do this. In the ThisWorkbook
code module, use the following code. Change the references to Sheet1 and
cell A1 to the appropriate sheet and cell.
Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ThisWorkbook.Worksheets("Sheet1").Range("A1")
.Value = .Value + 1
End With
End Sub
Does a printpreview count? It does in beforeprint - just a heads up.
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.