ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Purchase Order Template Numbering (https://www.excelbanter.com/excel-discussion-misc-queries/65532-re-purchase-order-template-numbering.html)

DABroussard

Purchase Order Template Numbering
 
Hi, I would like to print out blank purchase orders - with the numbers
automatically generating - is this possible with this macro and if so how do
I make that happen?

Thanks so much! Your post was very helpful.


Denise Broussard


"Geoff Lilley" wrote:

Here's what you do:

1) Go to your Window menu, and choose Unhide. You should see a file called "PERSONAL.XLS" that you can open.
2) In that file, put in the LAST purchase order number you used.
3) Then, go to Window, and choose "Hide" again.
4) Go back to the purchase order spreadsheet.
5) Go to Tools-Macro-Visual Basic Editor.
6) Click on the file name on the upper-left hand corner.
7) Go to the Insert menu, and choose "Module."

Paste this code:

Sub AddPONum()
Dim PONum As Long
Windows("PERSONAL.XLS").Visible = True
Range("A1").Activate
Do Until ActiveCell.Formula = ""
ActiveCell.Offset(1, 0).Activate
Loop
ActiveCell.Offset(-1, 0).Activate
PONum = ActiveCell.Formula + 1
Windows("PERSONAL.XLS").Visible = False
Range("B1").Activate
ActiveCell.Formula = PONum
End Sub

The only line you may have to change is the one that says Range("B1").Activate. Change B1 (keep the quotes) to refer to the cell where you want the PO number going.

To run, just go Tools-Macro-Macros, and click on the macro name.

Cheers,
Geoff Lilley

MCDST, Microsoft Office Master Instructor (XP/2000),
Microsoft Office Specialist Master (XP/2000)

"fortune10" wrote:

I am using Office 97 Excel Purchase Order template but cannot find out how to have my P.O. numbers to auto sequence. I have been manually assigning them a number.
Any suggestions?



All times are GMT +1. The time now is 11:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com