seting up an invoice in excel

S

sunshinehobbit

i have set up an invoice template in excel but do not know how to set
invoice numbering up. I want to set it so that every time i open the template
the number aotmaticly changes. can any one out there help me please thank you
 
N

Nick Hodge

You could set up some code in the ThisWorkbook module to respond to the
Workbook_Open() event, like so (Presumes the invoice number is in Sheet1
cell A1

Private Sub Workbook_Open()
Worksheets("Sheet1").Range("A1").Value = _
Worksheets("Sheet1").Range("A1").Value + 1
End Sub

If you need help implementing the code check out event code here

http://www.nickhodge.co.uk/vba/vbaimplement.htm#eventcode

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top