Maureen Preece
New Member
- Joined
- Jun 21, 2021
- Messages
- 1
- Office Version
- 2016
- Platform
- Windows
Hi - MY VBA is a print with consecutive numbers on each sheet printed, cell P1, but also in cell P43 I need to put in consecutive numbers, that are different then P1, then allow to print based on the numbers count in P1, the sheet is to be printed on the same A4 paper each side, hope this makes sense, new to this stuff.
Sub PrintJobs()
Dim i As Long, startnum As Long, lastnum As Long
startnum = Application.InputBox("Enter the first job number to be printed", "Print Job Number", 1, , , , , 1)
lastnum = Application.InputBox("Enter the last job number to be printed", "Print Job Number", 1, , , , , 1)
For i = startnum To lastnum
Range("P1").Value = i
ActiveWindow.SelectedSheets.PrintOut
Next
End Sub
Sub PrintJobs()
Dim i As Long, startnum As Long, lastnum As Long
startnum = Application.InputBox("Enter the first job number to be printed", "Print Job Number", 1, , , , , 1)
lastnum = Application.InputBox("Enter the last job number to be printed", "Print Job Number", 1, , , , , 1)
For i = startnum To lastnum
Range("P1").Value = i
ActiveWindow.SelectedSheets.PrintOut
Next
End Sub