Computing.Net > Forums > Office Software > invoice template

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

invoice template

Reply to Message Icon

Name: c. white
Date: July 6, 2009 at 15:58:55 Pacific
OS: Macintosh
Subcategory: Microsoft Office
Comment:

I'm creating an invoice template but want the invoice number to change every time I open the template. Does anyone know how can I formulate a cell on the spreadsheet so that each time I open the workbook the number in that cell counts up? Thanks



Sponsored Link
Ads by Google

Response Number 1
Name: Mike (by mmcconaghy)
Date: July 6, 2009 at 16:44:42 Pacific
Reply:

You will probably need a piece of VBA code to accomplish this.

Try:

Private Sub Workbook_Open()
Range("a1").Value = Range("a1").Value + 1
End Sub

Assuming your Invoice number is in cell A1

MIKE

http://www.skeptic.com/


0

Response Number 2
Name: c. white
Date: July 6, 2009 at 16:58:22 Pacific
Reply:

Many thanks Mike. I'm afraid I only have very basic Excel knowledge and I don't understand what you mean. Please would you mind explaining (for dummies style!)

Thank you


0

Response Number 3
Name: Mike (by mmcconaghy)
Date: July 6, 2009 at 17:20:12 Pacific
Reply:

My VBA skills are not that much greater than yours, I’m just beginning to delve into it.

To get the code to work you will need to first access the VBA editor:
Press ALT-F11

Once it opens, on the Task Bar, press the Project Explorer button or press CTRL-R

When the Project Explorer window opens, find the line that reads VBAProject followed by your filename and Double Click on the line.

Next, at the bottom of the list that just appeared should be a line that reads “ThisWorkbook”
Double Click it and in the window that appears on the right, paste the code I gave you:

Private Sub Workbook_Open()
Range("a1").Value = Range("a1").Value + 1
End Sub

Press ALT-F11 again to get out of the VBA editor and then save the file.


This should work……..

MIKE

http://www.skeptic.com/


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


QuickBooks File Transfer Can I convert a xls file ...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Office Software Forum Home


Sponsored links

Ads by Google


Results for: invoice template

creating simple program in excel... www.computing.net/answers/office/creating-simple-program-in-excel/6346.html

Invisible hart on Word www.computing.net/answers/office/invisible-hart-on-word/9176.html

Excel VBA www.computing.net/answers/office/excel-vba/9217.html