4 computers on the same file: how to recognize the computer?

DID

New member
Joined
Jan 14, 2014
Messages
15
Reaction score
0
Points
0
Hello everybody, I hope that you can help me with with following problem:

I have 4 computers that have the same excel file open (from the network), and all of them can at the same time edit the file. Each computer has a barcode scanner which scans a barcode, which gives a 8-digit number in the selected cell. However, now I am not able to see which of the 4 computers have scanned which barcode. How is it possible to recognize which of the 4 computers have added which line in the file? Either as an letter addition to the 8-digit barcode scanned, or as a new cell next to the "barcode scanned"-cell, or some other "trace"...

I hope you are able to help me...
 
is data only entered by a barcode scanner?
you can get the user name of the person using the excel sheet.
application.username
 
is data only entered by a barcode scanner?
you can get the user name of the person using the excel sheet.
application.username


Hello dear Simi,

well the barcode digit is entered in column B, where the date and time are stamped in column A, when something is written (scanned) in column B. In column C the user have to write a letter (A, B, C, D,.....), which indicates the why the barcode was scanned. But I would like to know which written letters (A, B, C, D,...) are most common on each of the 4 computers.
 
I have tried to use the following code:

Sub Usernameincell()
If Target.Column = 2 Then
Cells(Target.Row, 4).Value = Application.UserName
End If
End Sub

However I get the Run-time error 424.

What do I do wrong?
 
Where are you putting that sub, or calling it from?

if you put the guts of that sub in the workbook_Sheetchange it works for me, this is in the ThisWorkbook code section.

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Target.Column = 2 Then
Cells(Target.Row, 4).Value = Application.UserName
End If
End Sub
 
Back
Top