A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Auto form number



 
 
Thread Tools Display Modes
  #1  
Old November 13th, 2003, 06:52 AM
Freshman
external usenet poster
 
Posts: n/a
Default Auto form number

Dear experts,

I want to create a form template with a form number. This
number should be unique and never reuse again. For
example, the starting number is 0001, then I want the
number will be changed automatically to 0002 and so forth
when the form of 0001 is printed. What is the formula for
this number automation? Please kindly advise.

Many thanks.
  #2  
Old November 13th, 2003, 09:12 AM
bertieBassett
external usenet poster
 
Posts: n/a
Default Auto form number

you need to set up a macro so that when you print the sheet, it will
automattically update the cell that you have defined for your `unique
number`


Sheets("worksheet").Select ' SELECT SHEET

a = Workbooks("filename.xls").Worksheets("worksheet"). Range("a1").Value
' DEFINE VALUE OF A - FROM CELL IN WORKSHEET

ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True ' PRINT
SHEET

a=a+1 ' UPDATES UNIQUE NUMBER

Worksheets("worksheet").Range("a1").Value = a ' UPDATES UNIQUE NUMBER
ON SHEET


"Freshman" wrote in message
...
Dear experts,

I want to create a form template with a form number. This
number should be unique and never reuse again. For
example, the starting number is 0001, then I want the
number will be changed automatically to 0002 and so forth
when the form of 0001 is printed. What is the formula for
this number automation? Please kindly advise.

Many thanks.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:46 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.