+ Reply to Thread
Results 1 to 11 of 11

Print all records in 1 button click

  1. #1
    Registered User
    Join Date
    06-13-2016
    Location
    Zambales, Philippines
    MS-Off Ver
    2007
    Posts
    4

    Print all records in 1 button click

    Hi,

    I made a payroll file with payslips that has drop down list of employee names, then looks up for the data depending on which employee I choose in the list. My problem is I don't have any idea with Macro or VBA and I would like to add a "Print All" button which prints payslips for every employee on the list.

    Hope someone can help me.

    Thanks in advance.
    Last edited by dgc050887; 06-14-2016 at 01:10 AM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,625

    Re: Macro for printing payslips in one click button

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title go to your first post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    06-13-2016
    Location
    Zambales, Philippines
    MS-Off Ver
    2007
    Posts
    4

    Re: Macro for printing payslips in one click button

    Edited. Apologies for non compliance...

  4. #4
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,909

    Re: How to make one click buton to print all records

    If Ben gives Go Ahead I'd post example file but for starters I'd loop through Employee Names and put one name after the other in cell which holds dropdown (no need for that anymore then)
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  5. #5
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,909

    Re: How to make one click buton to print all records

    First change topic title to "Print all records in 1 button click". This makes searching database easier for future users.
    Secondly post example file with desensitized data so we can see what we're dealing with.

  6. #6
    Registered User
    Join Date
    06-13-2016
    Location
    Zambales, Philippines
    MS-Off Ver
    2007
    Posts
    4

    Print all records in 1 button click

    Here is the dropbox link to the file...
    Last edited by dgc050887; 06-14-2016 at 05:17 AM.

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

    Re: Print all records in 1 button click

    Hi dgc050887,

    First of all well done in setting up your payslips like this. So many times I see a separate tabs for each different (in this case employee) item which just isn't the way to go.

    This should do what you're after:

    Please Login or Register  to view this content.
    Note this forum allows attachments so there's no need to use file share sites in future.

    Regards,

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  8. #8
    Registered User
    Join Date
    06-13-2016
    Location
    Zambales, Philippines
    MS-Off Ver
    2007
    Posts
    4

    Re: Print all records in 1 button click

    Wow! Thank you so much Sir Trebor 76. It is working perfectly!

    Thank you also to sir bakerman2.

    God Bless both of you.

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

    Re: Print all records in 1 button click

    Wow! Thank you so much Sir Trebor76. It is working perfectly!
    You're welcome. If you could mark the thread as solved it would be appreciated

    Regards,

    Robert

  10. #10
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,294

    Re: Print all records in 1 button click

    Hi Robert

    Thanks for info. I've attached my Workbook for perusal. Not sure if I would know how to incorporate a template coding. Works perfectly as is.
    Attached Files Attached Files

  11. #11
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,294

    Re: Print all records in 1 button click

    Oops wrong thread...My bad. Sorry guys

+ 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. Need Help with Printing Payslips using Macros In excel 2007
    By Sponjaa in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-14-2016, 07:11 AM
  2. Button Click on Spreadsheet commanded by Button Click on Userform
    By Quilie19 in forum Excel Programming / VBA / Macros
    Replies: 33
    Last Post: 04-07-2015, 11:35 PM
  3. [SOLVED] Macro to run on button click
    By rlkerr in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-17-2012, 04:14 PM
  4. Cant Get my macro to click a Button
    By pulkit lila in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-15-2012, 03:59 PM
  5. [SOLVED] How do I run the macro for a button click without clicking the button?
    By flyboy54 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-12-2012, 10:45 AM
  6. Printing Macro-to click a print button
    By acinom in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-12-2011, 03:38 AM
  7. Printing worksheets with a click of a button?
    By ivwshane in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-12-2008, 05:11 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