PDA

View Full Version : Labor Tracking / Time Tracking



here2learn
08-08-2017, 10:06 PM
Hello All,

I really appreciate all the help I've found here!

I am faced with issues on my current task and was hoping someone could assist:


I would like to have a user enter their ID #. and area they are entering.


From there I would like to go to the corresponding tab named for the selected area and look up the ID # entered to enter a timestamp by that user.


The next time a user who already has a time stamp entered creates a new time stamp in a new area to enter a time stamp in the corresponding new area tab as well as next to the previous entered timestamp of the same user.



Example:


joe blow user 122 comes up to the pc and is prompted to specify his area he is entering, next he is asked to scan his badge(122). He selects 'area a' from the list and then scans his badge.


joe blow comes back and now selects 'area b' and again scans his badge.


So at this point joe blow #122 should have 3 time stamps in his designated row, 2 on 'area a' tab and 1 on the 'area b' tab.

https://mail.google.com/mail/u/0/?ui=2&ik=b854632f9e&view=fimg&th=15dc55064a7371d2&attid=0.1&disp=emb&realattid=ii_15dc5500cc9a25b4&attbid=ANGjdJ_ETFl4r7e6MxF9uc5ZJAEPM5nEPhdR0dZZ8-9meHmXOp4pOxX0MxLQ95cxglZlykwpvjYeDCpMKSKjz8CtAxEg2Vro7QIJHK56wIyEk2puTr--an3eM_RhjRg&sz=w1060-h246&ats=1502255029836&rm=15dc55064a7371d2&zw&atsh=1




I would appreciate any support you could give me on this quest.



Thanks for your time in advance.


Have A Wonderful Day!

SamT
08-09-2017, 06:34 AM
I assume you have the code to scan badges.

I would make a VBA UserForm that opened when the workbooks was opened, then I would prevent the book from closing if the UF was still open. (ThisWorkbook, BeforeClose Event.) I would also use the ThisWorkBook Sheet_Activate Event to prevent any User from opening a Worksheet. You can use the Design Mode to edit the Worksheets or write a Macro to close the UF without triggering a Workbook Close

The UF Areas Listbox can be filled with Area/Sheet Names by reading the collection of Names in WorkSheets.

When the Areas Listbox "Change"s, Have the "Please Scan Badge" Label or TextBox appear. When the Badge is Scanned, hide the Notice and load the Timestamp in the Worksheet selected in the Areas ListBox.

Use a simple WorkSheet.Range.Find to find the Cell of Employee "122" and End(xlToRight).Offset(0, 1) to get the first empty cell in that Row

Finally, I would Close the Workbook When the UF is Closed with the Done/Close Workbook CommandButton.

For more information, see the Helps or google the italicized words above

here2learn
08-09-2017, 11:05 AM
SamT thanks so much for a jump-off point! I've been trying to get things sorted out for a while now, I'll definitely try to work in those suggestions.

Have a great day!