Printing a form from excel

B

bulwark

Can anyone help with this please,

I have a form set up with everything working in the various fields.
But I want to print out numerous pages with the value of a single cell
increasing by one on each sheet printed.
can anyone give me the formula to do this as I am in over my head now.
Thanks hopefully.
 
D

Dave Peterson

How about a macro?

Option Explicit
Sub testme()

Dim myCell As Range
Dim wks As Worksheet
Dim iCtr As Long

Set wks = Worksheets("sheet1")

With wks
Set myCell = .Range("a1") 'whatever cell you need

If IsNumeric(myCell.Value) Then
For iCtr = 1 To 100
'add 1 first, then print???
myCell.Value = myCell.Value + 1
wks.PrintOut preview:=True
Next iCtr
End If
End With

End Sub


remove the "preview:=true" when you're done testing.

I just add one to the existing value in A1 of Sheet1. Then print it.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
 
Top