Lodgement numbers

coffee2k3

New Member
Joined
Dec 9, 2003
Messages
4
Hi gurus :pray: I wonder if you could help me....I am an absolute n00b when it comes to VBA so any help would be appreciated. I searched the boards for autonumbers and browsed tru 100's of 'invoice' topics but with no luck. Or I didn't understand maybe?

I am trying to design a lodgement system, the idea would be:

We got 5-6 users and they need a unique, increasing lodgement number every time they fill in and save a workbook.

would it be done by:

Open template (?) , fill it in, get new (unique, increasing) lodgement number and save it as unique record. I reckon there should be a 'number track' file on the network and you could grab a number by hitting a button (macro) from the template? How would I do that?

Thanks
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Alternatively use a cell on the template to hold the last lodgement number.
Not fool proof and I'm sure there is a much better way.


Something like this:

Sub Lodgements()

Range("A1").value = Range("Z1").value
Range("Z1").value = Range("Z1").value +1

End Sub

Where Z1 holds the last lodgement reference and
A1 holds the current lodgement value

Drawback: template needs to be saved each time lodgement is made otherwise template will lag behind.

Starter for ten at least!!!

Jim
 
Upvote 0

Forum statistics

Threads
1,214,542
Messages
6,120,116
Members
448,945
Latest member
Vmanchoppy

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