Results 1 to 11 of 11

Add and Remove Inventory with bar code scanner

Threaded View

  1. #1
    Registered User
    Join Date
    02-25-2014
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Add and Remove Inventory with bar code scanner

    I am hoping I can get some help. I found a macro that other say works well that I would like to use, however I cannot get it to run. I paste it in and then the macro isn't there to choose to run. Attached is the basic rough draft of what I need.
    The Macro that I found and wanted to use is below. I am running Excel 2010, not sure if that is the issue or if I am pasting it in wrong or what but its getting very frustrating. Any help would be very much appreciated!

    Private Sub Worksheet_Change(ByVal Target As Range)
    Select Case Target.Address
    Case "$A$4" 'add
    If Target.Value <> "" Then
    On Error Resume Next
    Set xitem = Range("C8", Range("C" & Rows.Count) _
    .End(xlUp)).Find(Range("A4").Value)
    With xitem.Offset(0, -1)
    .Value = .Value + 1
    End With
    On Error GoTo 0
    If xitem Is Nothing Then
    MsgBox "The item scanned is not on the list."
    End If
    Range("A4") = ""
    Range("A4").Select
    End If
    Case "$C$4" 'remove
    If Target.Value <> "" Then
    On Error Resume Next
    Set xitem = Range("C8", Range("C" & Rows.Count).End(xlUp)) _
    .Find(Range("C4").Value)
    With xitem.Offset(0, -1)
    .Value = .Value - 1
    End With
    If xitem Is Nothing Then MsgBox Target & " cannot be found " _
    & "and cannot be removed."
    Range("C4") = ""
    Range("C4").Select
    On Error GoTo 0
    End If
    Case "$E$4" 'find
    If Target.Value <> "" Then
    On Error Resume Next
    Set xitem = Range("C8", Range("C" & Rows.Count).End(xlUp)) _
    .Find(Range("E4").Value)
    If xitem Is Nothing Then
    MsgBox Target & " was not found."
    Range("E4").Select
    End If
    Range("E4") = ""
    xitem.Select
    On Error GoTo 0
    End If
    End Select
    End Sub
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Can Excel be used with a barcode scanner to track inventory?
    By polluxtroy12 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-05-2013, 09:43 PM
  2. Trying to track inventory using a barcode scanner in Excel
    By ernht38 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-01-2013, 08:16 AM
  3. Using Excel with bar code scanner for inventory.
    By pracicot in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-28-2012, 11:05 AM
  4. [SOLVED] Inventory code to remove duplicates and sum totals
    By Chilisauce in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-19-2012, 11:41 AM
  5. How to update inventory by scanner
    By gurtej1 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-07-2010, 08:49 PM

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