change field number automatically when printing

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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.
 

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.

Ask a Question

Back
Top