+ Reply to Thread
Results 1 to 15 of 15

auto consecutive numbering

  1. #1
    Registered User
    Join Date
    09-28-2007
    Posts
    6

    auto consecutive numbering

    I have a form that I use often, but numbering is slow because I go in and number the form, print, go back and put in next number, print, etc. Is there a macro or formula that will automatically update the consecutive numbers when I enter or print??

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Assuming the number is in A1 of sheet1, this code will do it

    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    09-28-2007
    Posts
    6

    Thanks, but

    How do I write code??? I'm just a admin assist, but I really need for this to work.

  4. #4
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127
    Please clarify. Are you printing the SAME form multiple times, and you want each copy to have a different number? Or do you print a form one time, and each time you print a different form, you would like the number to incremement by 1?

  5. #5
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    If you want to learn code you could start by looking at the link below.

    If you want to know where to add Roy's code then see link

    http://www.contextures.com/xlvba01.html#Workbook

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  6. #6
    Registered User
    Join Date
    09-28-2007
    Posts
    6

    How to make same form, different form #

    I am printing the same form multiple times, and I want each copy to have a different number. How do I make this happen??

  7. #7
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    You would need VBA, assuming you are printing Sheet1 & the number is in A1 This example uses the Before_Print event

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    09-28-2007
    Posts
    6
    How do I accomplish this Roy?? Is this a macro or something very strange to me? Can you show me an example??

  9. #9
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Yes it's code. Goes in ThisWorkbook module. See link for details.

    http://www.contextures.com/xlvba01.html#Workbook

    To run press the print button

    VBA Noob

  10. #10
    Registered User
    Join Date
    09-28-2007
    Posts
    6
    I need cell D1 to update every time I print or enter, I don't care which, I need for it to read W6090 print then W6091 print,,,,,


    DATE MAPSCO W6089

    NAME

    ADDRESS CITY

    JOB # INSTALLER(S) 10-7 10-8

  11. #11
    Registered User
    Join Date
    09-28-2007
    Posts
    6

    Auto numbering a form

    I need cell D1 to update every time I print or enter, I don't care which, I need for it to read W6090 print then W6091 print,,,,,


    DATE MAPSCO W6089

    NAME

    ADDRESS CITY

    JOB # INSTALLER(S) 10-7 10-8

  12. #12
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Format D1 as "W"0 and set it to the inital value (e.g., 6089).

    Insert this code in the ThisWorkbook module, changing to the correct sheet name:
    Please Login or Register  to view this content.
    Note that the number will increment before the sheet is printed.

  13. #13
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    abchildress,

    Please read rules below. Duplicate posts are not permitted

    VBA Noob

  14. #14
    Registered User
    Join Date
    02-06-2014
    Location
    Central Australia
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: auto consecutive numbering

    shg, you could try being a little more helpful to novices like those above, and even me, i can do some nifty tricks in Excel but even this one needs help...
    i have a little form, to be filled by hand, 3 copies to a sheet, so we are gonna print them, and cut the page into 3 lil vouchers

    Cell G2 will start autonumbering at 1001
    Cell G18 could be 1002, or decide a quantity to print (50) and start at say 1050
    Cell G34 could be 1003, or as above and start at 1101

    I have heard of a method to print, say 20 forms, starting say, 1001, ending 1020 and a text file saves the last number used, so the next print run picks up from there, at 1021

    guide us nicely on some of these ideas or queries

    Remember, we are not all code or macro gurus like you, thats why we ask

  15. #15
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: auto consecutive numbering

    Limoman,

    Unfortunately you need to post your question in a new thread, it's against the forum rules to post a question in the thread of another user. If you create your own thread, any advice will be tailored to your situation so you should include a description of what you've done and are trying to do. Also, if you feel that this thread is particularly relevant to what you are trying to do, you can surely include a link to it in your new thread.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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