Formula question
Well, that's cleaner than mine!
"Rick Rothstein" wrote:
You can do that using VBA event code. Right click the icon immediately to
the left of the File item on Excel's menu bar and select View Code from the
pop up menu that appears. Copy/Paste this code into the code window that
appeared (it is the code window for ThisWorkbook)...
Private Sub Workbook_BeforePrint(Cancel As Boolean)
With Worksheets("Sheet1").Range("A1")
.Value = .Value + 1
End With
End Sub
Change the Sheet1 and A1 references in the Worksheets and Range function
calls in the With statement to the worksheet name and cell address where you
want this counter placed.
--
Rick (MVP - Excel)
"iarnold" wrote in message
...
I am trying to find a formula that will advance the numerical value of a
cell
by 1 when I print a document - its for an invoice template, so that the
invoice number advances. Because I have a number of worksheets in this
workbook, I would want them all to advance by 1 when I print.
Help!
|