Sequential Invoice Numbering

GVERB1219

New Member
Joined
Sep 27, 2013
Messages
8
Hi all,

Back for my second question here.

I have a receipt template I made in Excel 2003....(yes it's old, but so am I and it's all I have)....:ROFLMAO:

I have an invoice number that I want to have change up by one everytime I open the Receipt Template
The cell for the invoice number is F2
I can get the numbers to change ONLY if every time I'm done I save it as another TEMPLATE

I open the template.......it shows number 1498 in cell F2
I fill in all the customers info to the other cells
I normally save the file as a workbook with customers name in a "Completed Charters" folder
Then close the template
Then when I open the TEMPLATE again, I have a fresh blank page to input the next customers info in.
The ONLY way I can get the numbers to go up by 1 is to ONLY "save as" the file as a TEMPLATE again, then close it, then it tells me it will be saved as 1498, next file will be 1499.
I know all I have to do is open the Template and "overwrite" the old customers info with the new info each time, but
that kinda defeats the purpose of having a template to get a fresh blank page open every time.
I'd like to be able to just save the file normally, then close the template and have a new blank sheet open with the next number in sequence.
Am I asking too much.........:confused:

Here's what I have in the

ThisWorkbook for code.......

Option Compare Text
Private Sub Workbook_BeforeClose(Cancel As Boolean)
If Cancel = True Then Exit Sub
If Not Me.FileFormat = xlTemplate Then Exit Sub
UserForm1.Show
End Sub


Private Sub Workbook_Open()
If Not Me.FileFormat Then Exit Sub
With Sheet2
.Visible = xlSheetVeryHidden
.Range("F2") = .Range("F2")
Sheet2.Range("F2") = .Range("F2") + 1
Me.Save
End With
End Sub




 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Don't know how I posted this twice..........can a mod please delete this tread......the one posted at 5:58 should stay........thank you.

I'll figure this forum out soon.......;)
 
Upvote 0

Forum statistics

Threads
1,215,174
Messages
6,123,454
Members
449,100
Latest member
sktz

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