+ Reply to Thread
Results 1 to 2 of 2

Barcode Scanner check in and check out

Hybrid View

  1. #1
    Registered User
    Join Date
    05-14-2012
    Location
    NYC
    MS-Off Ver
    Excel 2007
    Posts
    1

    Barcode Scanner check in and check out

    Hello everyone!

    I am trying to build an excel macro that records a date and time a package is scanned. I also want to record the time the package leaves.

    I am using a barcode scanner to record the package tracking number and I found this handy code that timestamps the package when its scanned (Check In time)

    However, I cannot figure out how to have scan the same package number and record a Check Out time on the same row.

    So Column "A" is Package # Column "B" Check In time Column "C" Check Out time.

    Option Explicit
     
    Private Sub Worksheet_Change(ByVal Target As Excel.Range)
    'when entering data in a cell in Col A
     
    On Error GoTo enditall
    Application.EnableEvents = False
                        If Target.Cells.Column = 1 Then
                            With Target
                                If .Value <> "" Then
                                .Offset(0, 1).Value = Format(Now, "mm/dd/yyyy hh:mm:ss AM/PM")
                                End If
                            End With
                        End If
     
    enditall:
    Application.EnableEvents = True
    End Sub
    Any help would be greatly appreciated as I am just starting with VBA.

    Thanks,
    Christian

  2. #2
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    882

    Re: Barcode Scanner check in and check out

    Cross-posted here
    http://www.mrexcel.com/forum/showthr...d=1#post315377
    If my solution worked (or not) please let me know. If your question is answered then please remember to mark it solved

    Computers are like air conditioners. They work fine until you start opening windows. ~Author Unknown

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1