Professional Documents
Culture Documents
VBA - HW2: Selection Logic For Employer 401K Contribution
VBA - HW2: Selection Logic For Employer 401K Contribution
VBA - HW2: Selection Logic For Employer 401K Contribution
401K Contribution
In the VBA Introduction Hands-on Practice Exercises, you added VBA code to the About, 401K, Bonus,
Close Form, and Quit buttons. Now you will enhance the code for the 401K button.
• Currently the VBA code for the 401K button calculates and displays the monthly 401K
contribution for an employee.
• You will add code that will include the employer’s contribution in this calculation.
• The employer’s matching contribution is 3% of the employee’s current salary, however for
Senior Project Managers the employer’s matching contribution is 5%.
5. To declare a string memory variable named strTitle , type the following code:
6. Type the following VBA code to store the employee’s Job Title into the memory variable strTitle
8. Check your VBA code with the code in Figure 1. Make any necessary corrections.
Figure 1
10. Test your code for the accuracy of the new 401K contribution calculation.
11. For record #1: Dennis Seinfeld, Associate Consultant his 401K contribution is $373.33.
For record #8: Ben Wilder, Senior Project Manager, his 401K contribution is $730.00.