Tech Tuesdays # 86 | Automate Salary Slip Generation using VBA Macros

118 views
Skip to first unread message

CA Association Ahmedabad

unread,
Apr 15, 2025, 1:31:59 AMApr 15
to caa-ahm group

Dear Esteemed Members,

Welcome back to TECH-TUESDAYS, your weekly dose of technological tools for professional development. In continuation of last week’s update where we introduced a Python-based script to generate salary slips in bulk, this week we bring to you another alternative—an Excel Macro (VBA-based utility)—for those who prefer working within the Excel environment. This is again developed by CA Miit Patel, Member of the Information Technology Committee of the CAAA.

This macro-based utility has been developed to serve the same purpose—automating the generation of salary slips for multiple employees—by simply maintaining the data in an Excel sheet and running a ready-to-use macro. No need for external programming setups. Just Excel.

What Does This Tool Do?

The macro reads employee names from a master sheet and generates personalized salary slips in PDF format for each employee, saving them in a designated folder. It’s ideal for routine month-end work and for use by payroll teams, accountants, and practitioners managing multiple client payrolls.

How to Use This Tool

  1. Download the Files
    You will receive:

    • Excel file: Salary sheet ICAI.xlsm (macro-enabled)

    • Macro code file:  Save as PDF Macro.txt (for reference/import)

  2. Unblock the Excel File
    If downloaded from email or cloud storage:

    • Right-click the .xlsm file > Properties > Tick Unblock > Apply > OK

  3. Enable the Developer Tab (if not visible)

    • Go to File > Options > Customize Ribbon

    • On the right panel, check the box for Developer

    • Click OK

  4. Trust the Macro

    • Open the file

    • If prompted with a Security Warning, click Enable Content

  5. Set Up the Excel File

    • In Sheet 1 named Salary working, fill in the details of all employees

    • Navigate to the Salary Slip sheet

    • In Cell M9, specify the full path of the folder where the PDFs should be saved (e.g., C:\SalarySlips)

    • Do not modify other formulas or references

  6. Run the Macro

    • Go to the Developer tab > Click on Macros

    • Select the macro named From_Excel_Save_as_PDF (or similar)

    • Click Run

  7. Check the Output

    • Individual salary slips will be generated in PDF format and saved in the folder specified in Cell M9

    • Each file will be named after the employee listed in the salary working sheet

A Word of Caution

  • Ensure the target folder exists and the path in Cell M9 is correctly entered

  • Avoid running the macro while the file is in use for heavy calculations

  • Macros must be enabled for the code to run

Conclusion
This Excel-based macro offers a no-code automation solution that’s both simple and powerful. It demonstrates how macros can be leveraged effectively to reduce repetitive effort and add significant efficiency to common accounting workflows.

Stay tuned for next week's TECH-TUESDAYS update as we explore more tools that empower your professional journey.

Disclaimer: While efforts have been made to ensure the reliability of the tools and the information shared, users are encouraged to conduct their own evaluations. The Chartered Accountants Association, Ahmedabad, and its Information Technology Committee are not liable for any direct or indirect damages or losses resulting from the use of these tools. Please ensure that your device has reliable antivirus software installed and is regularly updated.

Admin Office :-
Chartered Accountants Association, Ahmedabad
201 2nd Floor Darshak Building.
14/A Swastik Society,
Near AMCO BANK
Opp Shrey Hospital,
Punjabi Hall ni Gali
Navrangpura,
Ahmedabad 
Tel. No. 079 40392596
M. no. 6351956842

CA Association Ahmedabad

unread,
Apr 15, 2025, 10:14:28 PMApr 15
to caa-ahm group
Dear Esteemed Members,

Welcome back to TECH-TUESDAYS, your weekly dose of technological tools for professional development. In continuation of last week’s update where we introduced a Python-based script to generate salary slips in bulk, this week we bring to you another alternative—an Excel Macro (VBA-based utility)—for those who prefer working within the Excel environment. This is again developed by CA Miit Patel, Member of the Information Technology Committee of the CAAA.

This macro-based utility has been developed to serve the same purpose—automating the generation of salary slips for multiple employees—by simply maintaining the data in an Excel sheet and running a ready-to-use macro. No need for external programming setups. Just Excel.

What Does This Tool Do?

The macro reads employee names from a master sheet and generates personalized salary slips in PDF format for each employee, saving them in a designated folder. It’s ideal for routine month-end work and for use by payroll teams, accountants, and practitioners managing multiple client payrolls.

How to Use This Tool

  1. Download the Files
    You will receive:

    • Excel file: Salary sheet.xlsm (macro-enabled)

Save as PDF Macro.txt
Salary Sheet.xlsm
Reply all
Reply to author
Forward
0 new messages