+ Reply to Thread
Results 1 to 5 of 5

Duplicating PO Numbers

  1. #1
    Registered User
    Join Date
    05-16-2014
    MS-Off Ver
    Excel 2010
    Posts
    8

    Duplicating PO Numbers

    My Purchase Order spreadsheet currently has a macro that, when a button labeled "Save PO" is clicked, saves the sheet as a .pdf then erases the data, increments the number and resaves to the master file. I believed this to be a fairly solid way to avoid the master file being saved over by someone clicking "Save As" as well as moving us toward an all digital purchasing system. I find, however, that due to the number of users for the file I am having duplicate numbers created when someone accesses the file while it is open, but before the previous user has saved. The only possibility I can see is to have the number increment and resave to the master immediately upon open, instead of on close. I am at a loss after the use of Google and this forum's search feature. The threads I have found from other forums recommend doing exactly what I am now, but that is not working. Any suggestions will be taken under advisement.

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Duplicating PO Numbers

    You could try writing the latest PO number to an external file and incrementing it everytime your workbook is open

    On the ThisWorkbook tab

    Please Login or Register  to view this content.
    Martin

  3. #3
    Registered User
    Join Date
    05-16-2014
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Duplicating PO Numbers

    I understand the method you are suggesting, but I am unfamiliar with the syntax you are using.

  4. #4
    Registered User
    Join Date
    05-16-2014
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Duplicating PO Numbers

    I have used the following code and everything compiles, but there is no change made to my spreadsheet or my .txt file.

    Please Login or Register  to view this content.

  5. #5
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Duplicating PO Numbers

    You will need to have a number in the text file to start with. Also, the text file will eventually need to be in a shared location so that all your users write to the same one.

    Is the code in the ThisWorkbook tab?

    Suggest declaring PONumber as a variant.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 8
    Last Post: 09-25-2013, 04:08 AM
  2. how can I activate a 'numbers' duplicating prompt (help)
    By Paul B in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-06-2005, 06:05 AM
  3. how can I activate a 'numbers' duplicating prompt (help)
    By Earl in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  4. how can I activate a 'numbers' duplicating prompt (help)
    By Earl in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  5. [SOLVED] how can I activate a 'numbers' duplicating prompt (help)
    By Earl in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-13-2005, 07:48 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1