View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.newusers
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 1,726
Default From Template Save As Help

Have your code in a master workbook, with an invoice template worksheet
within it. Then copy that template to a new workbook, like so

ThisWorkbook.Worksheets("Template").Copy
With ActiveWorkbook
'your code
End With

just make sure that all of the code works on the actoive workbook from that
point on.

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"Pammi J" wrote in message
...
Hi
i have a invoice template and with the help of JLatham i have managed to
get
the invoice number to increment by one each time i open it. BUT i have a
big
problem when i have filled out the invoice with customer details and the
invoice number iss example 100 and then `save as` (cust name and no) it
seems
to be carrying the macro with it - so when i open cust name inv 100 it
becomes 101 - and then i open template that becomes 102 and so on.
I need it to save as per the village software invoice - saves just a copy
to
wherever i specify so if i need to reopen that copy it doesnt change the
invoice number.
Any help much appriciated