Hi Richard, Sounds like that will work.
But the only thing i cant work out is what event will trigger the new
order. I was hopeing the new order number would be triggered when the
file is opened. can you think of another way to do it?
The file i am working on is here if you wish to have a look
http://www.slorryy.com/tekbo.xls
Thanks
Yes the Workbook Open event could trigger the new order number. But
what then? Are you eventually going to save the new order with a new
name or just print it?
Either way you would need to save immediately the blank order that you
open as soon as the workbook open event has triggered the change of
number. That way the next time you open the order it will continue to
open with the last number already in place.
So in the VBA Project window, expand the Microsoft Excel Objects list
by clicking on the '+' sign, double click on the ThisWorkbook object,
and over on the right hand side of the VBA window, select the Workbook
Object from the left hand drop down and then the 'Open' event from the
right hand drop down window. Now enter the following code.
Private Sub Workbook_Open()
Range("Onumber") = Range("Onumber") + 1
ActiveWorkbook.Save
End Sub
I have named the cell G6 on Sheet1of your tekbo.xls template as
"Onumber"
HTH - let me know if not.
__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________