+ Reply to Thread
Results 1 to 3 of 3

Play Sound When Conditions are Met

  1. #1
    Registered User
    Join Date
    05-14-2012
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2010
    Posts
    8

    Play Sound When Conditions are Met

    Hello,

    I have a spreadsheet that I'm using to scan barcodes using a handheld scanner. I have a vlookup formula that checks that the scanned barcode is on the first sheet, and then enters the value of that barcode if so. What I am looking for is if a barcode is scanned that does not exist on the first sheet, to immediately play a sound to alert the operator that the scanned barcode is invalid.

    The scanning takes place on the 'Scan Sheet' in ColumnA, starting at A8. Columns B & C contain vlookups to return data related to the barcode. My thought is if A8 receives input but B8 and C8 still display "#N/A", then play sound.

    Attached is a sample file, hope this makes sense. Appreciate any assistance!

    Chris
    Attached Files Attached Files
    Last edited by Chris632; 03-31-2013 at 04:15 AM.

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Play Sound When Conditions are Met

    Try this pasted into the Sheet3 page in the VBA editor (Alt F11). Remember to save in .xlsm format.

    Please Login or Register  to view this content.
    Martin

  3. #3
    Registered User
    Join Date
    05-14-2012
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Play Sound When Conditions are Met

    Hi Martin, that seems to do the trick. Thanks!

+ 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