Invoice numbers

mrspigman

New Member
Joined
Sep 30, 2004
Messages
5
I hope that someone can help me...I have a blank invoice that I send out with about twenty drivers. I am needing a new invoice number to appear after each print. (So that I have twenty consecutive invoice numbers). I have this invoice sent up in Excel. Any help is appreciated. Thank you in advance.
 
This is a question that is asked often. At the top of this page is a "Search" link. It helps to check if your question has been asked before!

Try this link:

http://www.mrexcel.com/board2/viewtopic.php?t=102878&highlight=invoice

I use this one:

Private Sub Workbook_Open()
'Place this code in the "ThisWorkbook" Module
'to increment on the opening of the workbook.

'Sub Worksheet_Activate()
'Use the "Activate" Sub in a Sheet Module
'to increment on a sheet selection.

[A3].Value = [A3] + 1
ActiveWorkbook.Save
MsgBox "Each time this sheet is opened" & Chr(13) & "the starting number is increased." _
& Chr(13) & "And this blank template is saved" & Chr(13) & _
"with the new starting number!" & Chr(13) & Chr(13) & _
"Please, save any added data" & Chr(13) & "with a new file Name!" & Chr(13) & Chr(13) & _
"To preserve system integrity" & Chr(13) & "follow these directions!"
End Sub
 
Upvote 0
Welcome to the Board!

Here's a simple one that will print your Invoice and then increment the number:

<font face=Tahoma><SPAN style="color:#00007F">Sub</SPAN> PrintandIncrement()
    ActiveSheet.PrintOut
    <SPAN style="color:#007F00">'   Change sheet name and Range to suit</SPAN>
    Sheets("Sheet1").Range("A2").Value = Sheets("Sheet1").Range("A2").Value + 1
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN></FONT>

Just assign it to a button and you'll be good to go.

Hope that helps,

Smitty
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top