Hi everyone,
I'm not an expert in VBA and I need help with a payroll workbook that I'm working on.
With the help of "Dinish Kumar" I've been able to create a user form to add new employees to my database on worksheet "Employees".
So whenever there is a new employee I would go to the form and fill in the cells and run the macro to add the employee to the Main Table.
(For simplicity purposes I will refer to "Main Table" to the one under the Employees Worksheet and "Second Table" to the one in Sheet1).
So, the Second Table should contain the same employee names as the Main Table (mostly, unless the employee is terminated or quits). The rest of the data (besides the Last Name and First Name columns) is independent in both worksheets.
My goal is to have the Second Table automatically update with ONLY the employee Last Name and First Name if I add a new record to my Main Table. The VBA code would add the new row (new employee) in the Second Table (following the alphabetical order of the table). Hopefully this could happen simultaneously as soon as I press the "Add Record" button.
Additional to that, I would like to delete an employee from the Second Table if I add a Term Date in the Main Table (I could probably add another button for that).
I have attached what I have so far in my workbook.
Any help is greatly appreciated.
Thank you
Bookmarks