Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to make the invoice number increase
i tried to put the invoice number in my invvoice, but how to make it incease
by itself when i print a new one? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to make the invoice number increase
Hi,
Try this, Put below code in thisworkbook's module. Private Sub Workbook_BeforePrint(Cancel As Boolean) Dim MyAct Dim InvSht As Worksheet Dim InvNo As Range Set InvSht = Worksheets("Sheet1") 'Change to suite Set InvNo = InvSht.Range("F1") 'Change to suite If ActiveSheet.Name = InvSht.Name Then MyAct = MsgBox("Do you want to print Invoice with Invoice No. Auto increment?", vbYesNo, "Print Invoice") If MyAct = vbYes Then InvNo = InvNo + 1 End If End Sub Regards, Shah Shailesh http://members.lycos.co.uk/shahweb/ *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I make a cell increase by 40% when a number is entered | New Users to Excel | |||
how do i increase invoice number everytime its opened? | Excel Discussion (Misc queries) | |||
set increment increase in invoice number it | Excel Discussion (Misc queries) | |||
Excel,increase Invoice Number At Start | Excel Discussion (Misc queries) | |||
Increase the number of the invoice | Excel Worksheet Functions |