Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto numbering
Christiana
You said you wanted this number to increment when you open the file. What Chong gave you will do that. However, if you do not want to have skipped numbers in your invoice system, you might want to consider having the number increment at the print command. I have found that I sometimes cancel or otherwise stop a task for one reason or another. If this happens to you in the middle of preparing an invoice, then you will lose that number if you don't manually change it back. If you want to use the print command as the trigger, put this macro into your workbook module. To access the workbook module, look at the menu across the top of the screen. It has File - Edit - View - Insert - etc. Look to the left of the word File and find the Excel icon there. Right click on that icon. Select View Code. The module that pops up is the workbook module. HTH Otto Private Sub Workbook_BeforePrint(Cancel As Boolean) [A1] = [A1] + 1 End Sub "Christiana" wrote in message ... I would like to create a field that with contain a number which will be increased next time you will open the particular file. Basically what I have is an Invoice speadsheet and I want the Invoice number to be entered automatically each time someone opens the file. How I will do that? should I need VBA for this? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Auto numbering | Excel Worksheet Functions | |||
Auto Numbering | Excel Discussion (Misc queries) | |||
Auto Numbering | Excel Discussion (Misc queries) | |||
help with auto numbering | Excel Discussion (Misc queries) | |||
auto numbering | Excel Discussion (Misc queries) |