Re: Incrementing a cell after printing

Tech-Archive recommends: Fix windows errors by optimizing your registry



Coffeezone,
A simple way would be to use something like this in a before print event,
put in thisworkbook module

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Sheets("Sheet1").Range("A1").Value = _
Sheets("Sheet1").Range("A1").Value + 1
End Sub


For other ways to do this or if this is going to be used in a temple have a
look here
http://www.mcgimpsey.com/excel/udfs/sequentialnums.html


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"Coffeezone" <Coffeezone@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:394E077F-A1A0-4402-86B9-DA9D049DD74B@xxxxxxxxxxxxxxxx
> Example, printing an invoice with a number, then incrementing that number
by
> 1 and printing the next one. Any way to do that?


.


Quantcast