View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Stuart[_5_] Stuart[_5_] is offline
external usenet poster
 
Posts: 413
Default Increment a Template

User opens a template (say MasterOrder.xlt). Code in the
ThisWorkbook module of the template increments the
value in "J9" of the template by one, from /1000/ to
/1001/ , the first time through.

So the user now has the workbook "MasterOrder1.xls"
open, sheet "Master Order" is displayed, and on it, cell
"J9" has the value "/1001/".

How do I increment the 'original' template so that next
time through, the new value would be "/1002/" ? because
since the user is only opening a copy of the template, then
the original still holds the value "/1000/".

I only wish to do this if the user chooses to save the file.
If they close without saving, then the original Order
number needs to be preserved.

Regards.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.710 / Virus Database: 466 - Release Date: 23/06/2004