+ Reply to Thread
Results 1 to 12 of 12

Button to Generate Payslip

  1. #1
    Registered User
    Join Date
    09-21-2014
    Location
    Riyadh
    MS-Off Ver
    2003
    Posts
    10

    Button to Generate Payslip

    Hi Everyone!

    Currently i am using a dropdown button (*found in Payslip1 Tab) to select the employee name manually (using vlookup) and print one by one.
    Source TabName: AUG1.7
    Payslip TabName: Payslip1
    See attached file.
    My objective is to have a button to generate all of the employees payslip in one shot. How should i do it?

    Your help is highly appreciated.
    Thank you very much in advance.
    Attached Files Attached Files

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

    Re: Button to Generate Payslip

    Hi RBrain,

    Welcome to the forum!!

    Let us know how this macro goes:

    Please Login or Register  to view this content.
    Note, if the data in the workbook is not fictitious, I'd remove the attachment.

    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

  3. #3
    Registered User
    Join Date
    09-21-2014
    Location
    Riyadh
    MS-Off Ver
    2003
    Posts
    10

    Re: Button to Generate Payslip

    Thanks Sir TreBor =)

    The macro prints one payslip per page..how can i print 6 paylips (multiple payslips) in one page so to save cost?
    Regards,
    Last edited by RBrain; 10-24-2014 at 07:26 AM.

  4. #4
    Registered User
    Join Date
    09-21-2014
    Location
    Riyadh
    MS-Off Ver
    2003
    Posts
    10

    Re: Button to Generate Payslip

    Got it Sir Trebor!

    By changing the Print area on the macro =)

    Thank very much sir!

  5. #5
    Registered User
    Join Date
    09-21-2014
    Location
    Riyadh
    MS-Off Ver
    2003
    Posts
    10

    Re: Button to Generate Payslip

    Sorry Sir Trebor...

    I notice that the employee name on the 2nd payslip from the print area is not changing, how could i make the 2nd payslip get the 2nd employee data based from the source worksheet AUG1.7?

    Again thanks for the big help!

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

    Re: Button to Generate Payslip

    This will print the six playslips on the Payslip1 tab for six different employees through the 'EMPPAC1' named range:

    Please Login or Register  to view this content.
    HTH

    Robert

  7. #7
    Registered User
    Join Date
    09-21-2014
    Location
    Riyadh
    MS-Off Ver
    2003
    Posts
    10

    Re: Button to Generate Payslip

    Dear Sir Robert,

    I updated the code based from above (see file attached) but gives me just a highlighted employee data.

    Apologies for the disturbance =(
    Attached Files Attached Files

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

    Re: Button to Generate Payslip

    The code is working fine, but to print out the slips you just need change this line of code...

    Please Login or Register  to view this content.
    ...to this:

    Please Login or Register  to view this content.
    HTH

    Robert

  9. #9
    Registered User
    Join Date
    09-21-2014
    Location
    Riyadh
    MS-Off Ver
    2003
    Posts
    10

    Re: Button to Generate Payslip

    Sir Robert,

    Output still the same after we change it to .PrintOut
    Attached Files Attached Files

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

    Re: Button to Generate Payslip

    OK - try changing these lines...

    Please Login or Register  to view this content.
    ...to this:

    Please Login or Register  to view this content.
    Regards,

    Robert

  11. #11
    Registered User
    Join Date
    09-21-2014
    Location
    Riyadh
    MS-Off Ver
    2003
    Posts
    10

    Re: Button to Generate Payslip

    Wow! This is great! Thank you much Sir Robert!

    Problem Solved!

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

    Re: Button to Generate Payslip

    You're welcome - I'm glad we were able to provide you with a suitable solution.

+ 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 generate the payslip each emploe separate PDF files
    By svippala in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-04-2014, 12:35 AM
  2. [SOLVED] How to generate payslip and print it all at once
    By macnabong in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-10-2014, 02:36 AM
  3. [SOLVED] HOW to prepare payroll in macros and generate payslip in EXCEL 2003
    By sysen_aee in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 02-21-2014, 06:39 AM
  4. [SOLVED] Generate a payslip in Excel with info provided.
    By Manuel Pedro in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-23-2013, 09:26 AM
  5. VBa: To generate PAYSLIP
    By flopoguns in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-19-2013, 03:49 PM

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