yamato1990
New Member
- Joined
- Oct 3, 2018
- Messages
- 4
Hello,
I copied macro code from this thread https://www.mrexcel.com/forum/excel-questions/490441-printing-sequential-numbers.html
it works perfectly fine. but is there a way to make this code to print in descending order, for example (100,99,98,97 and so on).
I've try searching in this forum but cannot find the answer as I am not real VBA proficient, so I am looking for a little help.
Thanks.
I copied macro code from this thread https://www.mrexcel.com/forum/excel-questions/490441-printing-sequential-numbers.html
Code:
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("M2").Value = i
ActiveWindow.SelectedSheets.PrintOut
Next
End Sub
it works perfectly fine. but is there a way to make this code to print in descending order, for example (100,99,98,97 and so on).
I've try searching in this forum but cannot find the answer as I am not real VBA proficient, so I am looking for a little help.
Thanks.