How to create a template that creates and saves as sequencial num.

G

Guest

I am trying to create a Purchase Order template that will automatically
update the purchase order number to the next sequencial number when opened
and will have an activex button that the user can save the worksheet as that
po # automatically.

I am working with Excel 2003.
 
G

Guest

sub auto_open
Range("A3")=Range("A3")+1
end sub

supposing range A3 is where u have the bill number, each time you open the
file, it's going to increase the number in one
 
G

Guest

Am I correct that Auto_Open is still provided primarily for backward
compatibility and eventually will be deleted?

Workbook_Open is what I am using.

Lou
 
G

Gord Dibben

That would be my assumption.

Auto_Open is a holdover from pre-97 version when we still used Module Sheets.

I did very little with VBA in those days(don't do that much now) so don't know
if there even was a Thisworkbook object to run code from.


Gord
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top