Not quite- but we'll get there. Here's what I need you to do, starting
with step 0 because I forgot to make this step 1:
0. Create a backup copy of your template, so you can recover data in
case of a catastrophe.
1. Open the template and create a named range called JobNumber (spelled
just like that) by clicking on the menu *Insert *Name *Define. In the
top box type JobNumber and in the bottom box type =930 (or whatever
your current job number is). Click OK.
2. In cell I3, the job number cell, enter the formula =JobNumber and
the current job number will appear.
3. With the template showing on screen, press ALT-F11 to display the
Visual Basic editor. There is a project pane on the left side of the
window; in that pane your template's file name is displayed in bold
font. Below that is an icon for This Workbook. Right-click This
Workbook and select View Code. Copy and paste this code into the pane
on the right:
Private Sub Workbook_Open()
If Range("sheet1!c3").Value = "" Then Names("JobNumber").Value =
Evaluate(Names("JobNumber").Value) + 1
End Sub
4. Notice this part of the code: Range("sheet1!c3")
Change the sheet1 to match the tab name of your sprdsht, and change c3
to the client name's cell or another cell that is blank in the template
but that will be filled in for a job.
5. Note the job number displayed in I3, save the file, close it, open
it again, and you should see the job number has incremented by one.
6. Fill in a dummy name or whatever in the cell you indicated in step
4, save the file as though it was an actual job, and reopen. You
should see the job number has NOT incremented by one.
Let me know how it goes!