Consulting

Results 1 to 7 of 7

Thread: Autonumber form but be able to save as file each time

  1. #1

    Autonumber form but be able to save as file each time

    I have a po form that I set up. I have to autonumber a cell each time it is opened. I need to be able to "save as" each po but continuing to autonumber. I know there is a way to write to another worksheet the date/time and po number each time the form is accessed. I just can't figure out how to do this. This is the Macro that I am using:

    [vba]Private Sub Workbook_Open()
    MsgBox "You are now entering a new PO That's right..."
    Worksheets("Sheet1").Range("B1").Value = Date
    Worksheets("Sheet1").Range("D1").Value = _
    Worksheets("Sheet1").Range("D1").Value + 1
    End Sub
    [/vba] any help would be greatly appreciated. Thanks so much


    [uvba].[/uvba] ~Oorang

  2. #2
    Knowledge Base Approver VBAX Master Oorang's Avatar
    Joined
    Jan 2007
    Posts
    1,135
    Location
    What is "po"?
    Cordially,
    Aaron



    Keep Our Board Clean!
    • Please Mark your thread "Solved" if you get an acceptable response (under thread tools).
    • Enclose your code in VBA tags then it will be formatted as per the VBIDE to improve readability.

  3. #3
    Knowledge Base Approver VBAX Guru GTO's Avatar
    Joined
    Sep 2008
    Posts
    3,368
    Location
    Hi Aaron :-)

    I believe that's Purchase Order (number)

    Mark

  4. #4
    Hi, sorry, it is a purchase order. It's just a form we use but my supers are hand writing everything and i came up with a form but i can't get it to autonumber each time it is opened but save it as the new po number.

  5. #5
    VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    So you are using a sheet for data input and then want to save a copy of the sheet with an incremental number each time?
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  6. #6
    Knowledge Base Approver VBAX Guru GTO's Avatar
    Joined
    Sep 2008
    Posts
    3,368
    Location
    Greetings AZLeidbug,

    I just caught on (partially at least) to your username, as well as your recent joining. Sorry I missed that last night, a bit thick-headed on this end and was overly tired.

    Have to get my rear in gear and get to work, but please let me say Welcome! to vbaexpress - imho, the bestest forum! I am quite sure that you'll be glad you joined; there are some great folks here , even the Okies .

    Quote Originally Posted by azleidbug
    ...but i can't get it to autonumber each time it is opened but save it as the new po number.
    Quote Originally Posted by lucas
    So you are using a sheet for data input and then want to save a copy of the sheet with an incremental number each time?
    In reference to your question and in addition to Steve's, what would the pattern look like for creating new PO numbers?

    You might find it easiest/clearest to attach a small example wb with an example of several PO numbers in series, a short explanation ("Our PO NUmbers start with YY followed by a hyphen and six digits...") of the PO number creation and what the resultant filenames should be.

    Hope to help, and again, welcome aboard,

    Mark

  7. #7
    Knowledge Base Approver VBAX Guru GTO's Avatar
    Joined
    Sep 2008
    Posts
    3,368
    Location
    ACK! Forgot to ask, what's the leidbug part?

    Gotta go for now, else I'll be showing up ducking the boss...

Posting Permissions

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