change field number automatically when printing

S

sponder

We have a form in Excel, it is only one page, but we need a number on the right top corner of the sheet that changes automatically evey time we print the form

Is there any way to do this
Thank you
 
P

Peo Sjoblom

You could use a Workbook BeforePrint macro that do that, assume the number
is in cell G1

Range("G1").Value = Range("G1").Value + 1

like this

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Range("G1").Value = Range("G1").Value + 1
End Sub

--

Regards,

Peo Sjoblom


sponder said:
We have a form in Excel, it is only one page, but we need a number on the
right top corner of the sheet that changes automatically evey time we print
the form.
 
Top