Re: auto gererated number when sheet opened

Manq5230

New Member
Joined
May 19, 2003
Messages
18
Office Version
  1. 365
  2. 2013
Platform
  1. Windows
Re: auto gererated number when sheet opened

I have a form that I wish to make into a template for our customers to fill in. I would like to have the "Purchase Order" field I've created to have a number automatically fill in with a new number everytime they open the template. Then they would do a save as and that number would stay with the saved file. Then when they open the template again it would then generate the next number in succession. Can this be done.

Thanks
Anthony
 
Re: auto gererated number when sheet opened

ok i have fixed the second problem, getting it to display 00001 etc, simple formatting issue. But still not having any luck with the first part. The auto implementation of the script.
 
Upvote 0

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Re: auto gererated number when sheet opened

You need to put the code in the ThisWorkbook module, not in a general module like Module1.
 
Upvote 0

Forum statistics

Threads
1,215,108
Messages
6,123,132
Members
449,097
Latest member
mlckr

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