Results 1 to 5 of 5

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

  1. #1

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



    Register for a FREE account, and/
    or Log in to avoid these ads!

    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...

  2. #2
    Conjurer Simi's Avatar
    Join Date
    Feb 2012
    Location
    Utah, USA
    Posts
    187
    Articles
    0
    is data only entered by a barcode scanner?
    you can get the user name of the person using the excel sheet.
    application.username

  3. #3
    Quote Originally Posted by Simi View Post
    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.

  4. #4
    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?

  5. #5
    Conjurer Simi's Avatar
    Join Date
    Feb 2012
    Location
    Utah, USA
    Posts
    187
    Articles
    0
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •