![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Feb 2002
Posts: 2
|
Is it possible to increase a cell # by 1 upon page print?? Example: 00001 in A20 then print the form, change number to 00002 for next printout.
|
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Sydney, Australia
Posts: 2,908
|
One way is to use the Before_Print event. Something like this:-
Code:
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Sheets("Sheet1").Range("A1").Value = Sheets("Sheet1").Range("A1").Value + 1
End Sub
If this is a problem then have a look at my reply to an earlier post - http://www.mrexcel.com/board/viewtop...=466&forum=2&7 However, that is a bit more complicated. HTH, D |
|
|
|
|
|
#3 |
|
New Member
Join Date: Feb 2002
Posts: 2
|
DK, thanks for your assistance, the code works. Once again, thank you very much.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|