Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 114
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I make a cell increase by 40% when a number is entered Linda New Users to Excel 2 December 28th 07 09:28 PM
how do i increase invoice number everytime its opened? stacey Excel Discussion (Misc queries) 1 March 3rd 06 11:37 AM
set increment increase in invoice number it tiredstudent Excel Discussion (Misc queries) 1 December 1st 05 07:21 PM
Excel,increase Invoice Number At Start LIGER Excel Discussion (Misc queries) 1 June 17th 05 05:19 PM
Increase the number of the invoice Gord Dibben Excel Worksheet Functions 0 January 25th 05 01:43 AM


All times are GMT +1. The time now is 07:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"