Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Geoff,
I am attempting to accomplish the same thing with Sequential PO numbering but, I am having trouble writing the Macro. I am running Office 2003 keep getting the following message: Compile error PLease help!!! Thx, Ken "Geoff Lilley" wrote: OK. That's because there's macros embedded in the invoice template. What I would do if I were you is as follows: 1) Create a new workbook. 2) In the new workbook, go Tools-Macro-Record New Macro. 3) When it asks you where you want to record the macro, choose "Personal Macro Workbook." That'll create the workbook called "Personal.XLS." 4) Record moving over one cell (or some insignificant thing like that). 5) Now, go Tools-Macro-Visual Basic Editor. 6) Whatever code is in there, feel free to erase. Then, just copy and paste the code I gave you earlier in there. That should work. Give me a holler if you have any questions. Thanks! Geoff "Purchase Order Template Numbering" wrote: Thank you for your response. I have two obstacles to this. 1) When I go to the Windows menu, 'unhide' is not an available option. (it is there but not as a clickable item) 2)When I go to Tools-Macro-Visual Basic Editor and click on the file name, it asked me for a password. I have no idea what it wants. I have no passwords. What do you suggest? Mike "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? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Setup Purchase Order Template to have a automatic number system? | Excel Worksheet Functions | |||
How do I list the most recent occrence of a purchase order? | Excel Worksheet Functions | |||
Purchase Order Template Numbering | Excel Discussion (Misc queries) | |||
purchase order counter in excel purchase order template | Excel Worksheet Functions | |||
Template Purchase Order | Excel Discussion (Misc queries) |