+ Reply to Thread
Results 1 to 12 of 12

Print Packing Slip # Increase

  1. #1
    Registered User
    Join Date
    10-14-2008
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    35

    Print Packing Slip # Increase

    Hi,
    I am new to this forum. From what i have read, there are a lot of kind people here. So i was wondering if someone could help me with creating a packing slip that will increase the packing slip number by one each time it prints. I found one that does that but if you put say print 5 copies in the print dialog box then it still just increases the 6th by one and all 5 copies have the same number. What i want to do is just have an empty form with all the fields that i need and print maybe 500 copies and then my drivers can fill then out by hand.
    Last edited by VBA Noob; 10-15-2008 at 02:40 AM.

  2. #2
    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
    Try this.

    It increases Sheet1 cell A1 number each time it's run and allows you to enter number of copies

    Please Login or Register  to view this content.
    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 !!!

  3. #3
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,527
    Hi there,

    Welcome to the forum.

    The following should do the trick - just enter the first packing slip number into the relevant cell (currently set at G3 - change as required [as noted in the code]) and then run the following macro:

    Please Login or Register  to view this content.
    HTH

    Robert
    Last edited by Trebor76; 10-15-2008 at 02:55 AM.

  4. #4
    Registered User
    Join Date
    10-14-2008
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    35
    Thanks alot guys! With the first reply i get an error but it looks like it would do much the same as the second one. I have exactly what i want now, Thanks again.

  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
    It may be because you don't have a sheet called Sheet 1

    VBA Noob

  6. #6
    Registered User
    Join Date
    10-14-2008
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    35
    You are absolutly right, that was the mistake i made I did not name it sheet1.
    One thing is it does not give a new number to any additional ones you print. I put the number 1000 in Cell A1 and the window poped up and I entered the # 2 and it printed to copies with the number 1001.

    With Trebor76 post that one does what i want but it makes each copy you want a new job and i have a laser printer and it takes a nice long break between each job you give it.
    Sorry for asking for so much help.

  7. #7
    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
    One thing is it does not give a new number to any additional ones you print.

    Each time you run it it increases the number by 1

    So 1000 in A1 and then the code it will print 1001. Next time you run the macro it will increase by 1 (1002) etc

    VBA Noob

  8. #8
    Registered User
    Join Date
    10-14-2008
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    35
    Thanks for the reply.
    Would it work to set it up so that it will increase each print by one not just after every time the macro runs ? The macro is doing exactly what you are saying it does but i never want to have 2 packing slips with the same number. If I run the code the way it is and say for example in the input box you enter the number 3 it will create a job for the printer to print 3 copies but each copy will have the same packing slip number.If you then decide to print some more the next job will have a new number but all the copies of that job will have the same number.

  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
    Try

    Please Login or Register  to view this content.
    VBA Noob

  10. #10
    Registered User
    Join Date
    10-14-2008
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    35
    Hi,
    When i run the code I get a Run-time error '9': Subscript out of range
    Am i doing something wrong ? or is it in the code?
    Thanks.

  11. #11
    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
    Same error has before?. Did you remember to change the sheet name

    VBA Noob

  12. #12
    Registered User
    Join Date
    10-14-2008
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    35
    Sorry my dumb mistakes. It does exactly what it should. You have been a great help.

+ 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. Setting Print Area across multiple sheets?
    By tekman in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-21-2011, 10:40 PM
  2. Print two worksheets as one print job
    By smiffy in forum Excel General
    Replies: 6
    Last Post: 06-17-2008, 04:22 PM
  3. Print / don't print pictures
    By rickalty in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-27-2007, 03:11 AM
  4. Print Worksheet From Custom Button Only
    By Gos-C in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 08-27-2007, 06:32 PM
  5. Print Range Macro "ALMOST" working.
    By Tom44556 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-19-2007, 11:53 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