Forum Home
Press F1
 
Thread ID: 18233 2002-04-20 22:06:00 Auto increment number printing from Excel Guest (0) Press F1
Post ID Timestamp Content User
44819 2002-04-20 22:06:00 Some weeks ago the question was asked, a clear answer was never given, so lets rewrite the question.

We have a standard form used to book jobs in, Option 1, we could print off a lot and write on the first one '1' then '2' and then '3' (without the quotes) Option 2 go to the 'Job number' cell and put in 1, then print that, then change 1 to 2, then print that, then change 2 to 3, and so on. WHAT WE WOULD REALLY LIKE is put 1 in the 'Job number' cell then press 'print' and have 1 printed on the first page 2 on the second page 3 on the third page and so, Is that impossible
Guest (0)
44820 2002-04-20 23:09:00 I don't know the answer to your question, sorry, but the following site may be of some use to you:

www.cpearson.com
Guest (0)
44821 2002-04-20 23:52:00 Hi John,

There are two possible ways that I can think of to do this. The first would be to have several copies of the form on one sheet and make the job number cell equal the previous job number cell plus one.

The second way is to write a macro. The following macro will ask for a start and end job number and will print out all sheets inbetween. Create a new macro (I have called mine printjobsheet) by going to tools and selecting new macro, paste the code below into the new macro. Modify the cell B1 to refer to the actual job number cell. When you want to print out a set of job sheets, run the macro and enter the range to print.

Good luck, let me know if you need any further help.

TS


---------

Sub PrintJobSheet()

startjob = InputBox('Enter the first job number to be printed')

endjob = InputBox('Enter the last job number to be printed')

For thisjob = startjob To endjob

Range('B1').Select

ActiveCell.FormulaR1C1 = thisjob

ActiveWindow.SelectedSheets.PrintOut

Next

End Sub
Guest (0)
1