VBA - Trying to scan barcode with FNC1 or FNC2 character?

NessPJ

Active Member
Joined
May 10, 2011
Messages
395
Office Version
  1. 365
Hello there,

I have an Excel tool which is used for scanning barcodes (mostly code128).
It works, but Application Identifiers (eg. "(00)" ) are recognised as "00".
This makes it impossible to have a fool-proof solution to identify the correct Application Identifier.
I would have expected some FNC1 or FNC2 character to pass through the scanner as well upon scanning the barcode,
otherwise you can never be sure where an actual Application identifier exists.

Is there any way in VBA to handle this input?
Or am i limited to defining static barcode layouts with fixed positions? (that would be very limited if the barcode layout changes).
 

Some videos you may like

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

NessPJ

Active Member
Joined
May 10, 2011
Messages
395
Office Version
  1. 365
I have an idea...is there an event for Form TextBoxes to make a single line out of the input as it is being entered?
Is there such a function for the TextBox_Change() event?

This would take care of some issues for dissecting a barcode.

Then all i would need is a routine to dissect a barcode looking at the Application Identifier and its data length but for it not to be used again once it was 'hit' during the reading of the string of barcode data.

EG.
Application identifier 00 is for SSCC data and has a length of 2 + 18
Application identifier 15 is for best before data and has a length of 2 + 6
Application identifier 10 is for batch code data and has a variable or fixed length 2+....

Has there never been a VBA module created for this purpose?
 

Watch MrExcel Video

Forum statistics

Threads
1,126,893
Messages
5,621,480
Members
415,844
Latest member
Reda Fouad Ramzy

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top