Hi i have a code whereby it works fine for when it finds the Staff ID for 1st Job allocated then it will update timestamp on the same line in column "M" when list has been selected from list box however when i try to update the another new line of row for the same person with different Job number it will still again update first Job line of row and not the 2nd Job line of row when i tried to add the 3rd Job.
me.lstselector.list(x,3) - it is the Staff ID in column G
me.lstselector.list(x,2) - it is the Job number in column F
i need code to find using Job number and staff ID, when matches it both then to updates time on same row every time in column M
here its the code
dim findvalue
Sheet1.Unprotect codePassword:="1234"
lCol = Me.lstSelector.List(x, 3)
Set findvalue = Sheet1.Range("G:G").Find(What:=lCol, LookIn:=xlValues).Offset(0, -2)
findvalue.Offset(0, 8).Value = Format(Now, "HH:MM:SS")
me.lstselector.list(x,3) - it is the Staff ID in column G
me.lstselector.list(x,2) - it is the Job number in column F
i need code to find using Job number and staff ID, when matches it both then to updates time on same row every time in column M
here its the code
VBA Code:
dim findvalue
Sheet1.Unprotect codePassword:="1234"
lCol = Me.lstSelector.List(x, 3)
Set findvalue = Sheet1.Range("G:G").Find(What:=lCol, LookIn:=xlValues).Offset(0, -2)
findvalue.Offset(0, 8).Value = Format(Now, "HH:MM:SS")