OnlyCorrectData = OnlyCorrectData & Mid(DataToEncode, I, 1)
End If
Next I
DataToFormat = OnlyCorrectData
DataToEncode = ""
End If
'Here we select character set A, B or C for the START character
StringLength = Len(DataToFormat)
CurrentCharNum = AscW(Mid(DataToFormat, 1, 1))
If CurrentCharNum < 32 Then C128Start = ChrW(203)
If CurrentCharNum > 31 And CurrentCharNum < 127 Then C128Start = ChrW(204)
If CurrentCharNum = 197 Then C128Start = ChrW(204) 'Added 2-18-05 for FNC2
If ((StringLength > 4) And IsNumeric(Mid(DataToFormat, 1, 4))) Then C128Start = ChrW(205)
'202 & 212-215 is for the FNC1, with this Start C is mandatory
If CurrentCharNum = 202 Then C128Start = ChrW(205)
If CurrentCharNum = 212 Then C128Start = ChrW(205)
If CurrentCharNum = 213 Then C128Start = ChrW(205)
If CurrentCharNum = 214 Then C128Start = ChrW(205)
If CurrentCharNum = 215 Then C128Start = ChrW(205)
If C128Start = ChrW(203) Then CurrentEncoding = "A"
If C128Start = ChrW(204) Then CurrentEncoding = "B"
If C128Start = ChrW(205) Then CurrentEncoding = "C"
For I = 1 To StringLength
'Added 2-18-05 for FNC2 / check for FNC2 which is ASCII 197 in any set other than C
If (CurrentCharNum = 197) Then
If CurrentEncoding = "C" Then 'switch to B
DataToEncode = DataToEncode & ChrW(200)
CurrentEncoding = "B"
End If
DataToEncode = DataToEncode & ChrW(197)
I = I + 1
End If
'check for FNC1 in any set which is ASCII 202 and ASCII 212-215
CurrentCharNum = AscW(Mid(DataToFormat, I, 1))
If ((CurrentCharNum = 202) Or (CurrentCharNum = 212) Or (CurrentCharNum = 213) Or (CurrentCharNum = 214) Or (CurrentCharNum = 215)) Then
DataToEncode = DataToEncode & ChrW(202)
'check for switching to character set C
ElseIf ((I < StringLength - 2) And (IsNumeric(Mid(DataToFormat, I, 1))) And (IsNumeric(Mid(DataToFormat, I + 1, 1))) And (IsNumeric(Mid(DataToFormat, I, 4)))) Or ((I < StringLength) And (IsNumeric(Mid(DataToFormat, I, 1))) And (IsNumeric(Mid(DataToFormat, I + 1, 1))) And (CurrentEncoding = "C")) Then
'switch to set C if not already in it
If CurrentEncoding <> "C" Then DataToEncode = DataToEncode & ChrW(199)
CurrentEncoding = "C"
CurrentChar = (Mid(DataToFormat, I, 2))
CurrentValue = CInt(CurrentChar)
'set the CurrentValue to the number of String CurrentChar
If (CurrentValue < 95 And CurrentValue > 0) Then DataToEncode = DataToEncode & ChrW(CurrentValue + 32)
If CurrentValue > 94 Then DataToEncode = DataToEncode & ChrW(CurrentValue + 100)
If CurrentValue = 0 Then DataToEncode = DataToEncode & ChrW(194)
I = I + 1
'check for switching to character set A
ElseIf (I <= StringLength) And ((AscW(Mid(DataToFormat, I, 1)) < 31) Or ((CurrentEncoding = "A") And (AscW(Mid(DataToFormat, I, 1)) > 32 And (AscW(Mid(DataToFormat, I, 1))) < 96))) Then
'switch to set A if not already in it
If CurrentEncoding <> "A" Then DataToEncode = DataToEncode & ChrW(201)
ElseIf ((I < StringLength - 4) And (CorrectFNC = 0) And ((CurrentCharNum <= 81 And CurrentCharNum >= 80) Or (CurrentCharNum <= 34 And CurrentCharNum >= 31))) Then
ElseIf ((I < StringLength - 3) And (CorrectFNC = 0) And ((CurrentCharNum <= 49 And CurrentCharNum >= 40) Or (CurrentCharNum <= 25 And CurrentCharNum >= 23))) Then
'Find the CheckDigit by finding the number + WeightedTotal that = a multiple of 10
'divide by 10, get the remainder and subtract from 10
I = (WeightedTotal Mod 10)
If I <> 0 Then
CheckDigit = (10 - I)
Else
CheckDigit = 0
End If
DataToEncode = DataToEncode & CheckDigit
'Compress UPC-A to UPC-E if possible
Dim D1 As String
Dim D2 As String
Dim D3 As String
Dim D4 As String
Dim D5 As String
Dim D6 As String
Dim D7 As String
Dim D8 As String
Dim D9 As String
Dim D10 As String
Dim D11 As String
Dim D12 As String
D1 = Mid(DataToEncode, 1, 1)
D2 = Mid(DataToEncode, 2, 1)
D3 = Mid(DataToEncode, 3, 1)
D4 = Mid(DataToEncode, 4, 1)
D5 = Mid(DataToEncode, 5, 1)
D6 = Mid(DataToEncode, 6, 1)
D7 = Mid(DataToEncode, 7, 1)
D8 = Mid(DataToEncode, 8, 1)
D9 = Mid(DataToEncode, 9, 1)
D10 = Mid(DataToEncode, 10, 1)
D11 = Mid(DataToEncode, 11, 1)
D12 = Mid(DataToEncode, 12, 1)
'Condition A
If (D11 = "5" Or D11 = "6" Or D11 = "7" Or D11 = "8" Or D11 = "9") And D6 <> "0" And (D7 = "0" And D8 = "0" And D9 = "0" And D10 = "0") Then
DataToEncode = D2 & D3 & D4 & D5 & D6 & D11
End If
'Condition B
If (D6 = "0" And D7 = "0" And D8 = "0" And D9 = "0" And D10 = "0") And D5 <> "0" Then
DataToEncode = D2 & D3 & D4 & D5 & D11 & "4"
End If
'Condition C
If (D5 = "0" And D6 = "0" And D7 = "0" And D8 = "0") And (D4 = "1" Or D4 = "2" Or D4 = "0") Then
DataToEncode = D2 & D3 & D9 & D10 & D11 & D4
End If
'Condition D
If (D5 = "0" And D6 = "0" And D7 = "0" And D8 = "0" And D9 = "0") And (D4 = "3" Or D4 = "4" Or D4 = "5" Or D4 = "6" Or D4 = "7" Or D4 = "8" Or D4 = "9") Then
DataToEncode = D2 & D3 & D4 & D10 & D11 & "3"
End If
'
'Run UPC-E compression only if DataToEncode = 6
If Len(DataToEncode) = 6 Then
'Now we must encode the check character into the symbol
'by using variable parity between character sets A and B
Select Case D12
Case "0"
Encoding = "BBBAAA"
Case "1"
Encoding = "BBABAA"
Case "2"
Encoding = "BBAABA"
Case "3"
Encoding = "BBAAAB"
Case "4"
Encoding = "BABBAA"
Case "5"
Encoding = "BAABBA"
Case "6"
Encoding = "BAAABB"
Case "7"
Encoding = "BABABA"
Case "8"
Encoding = "BABAAB"
Case "9"
Encoding = "BAABAB"
End Select
StringLength = Len(DataToEncode)
For I = 1 To StringLength
'Get the ASCII value of each number
CurrentCharNum = AscW(Mid(DataToEncode, I, 1))
CurrentEncoding = Mid(Encoding, I, 1)
'Print different barcodes according to the location of the CurrentChar and CurrentEncoding
7 OddNumberSum just so we don't have to create another variable
OddNumbo create anothoo var)" A OddNumbo create anothoo var)" A OddNumbo create anotho Case & ng = "B Case "9hand then tt for the data supr the drint = oPrEB"
4cc
Nv 4cc aDat 'gLeNAddOnToPrint = oPrEB"
td4M 64)
DBt = oPrEB"o If CurrentChar 'G
'A = oPrEBI'G
'A = oPr 'so we hts ns tf CurrentChar"B ?iAB"
nToPf2cc
Nv 4cc aDat 'gLsnco+A all 4"
Encoding = "BABBAA"te anothoo var)"snco+A all 4"
Encoding = "BABBAA"t3n2 Dim D5 As Strinda DataToEncode1sdncoding = "BBA ot3n2nBBAA"50lAoeToEncoding = "BBA "4"
Encoding = "BABBAA"OnToPrint =coding = "BABBAA"t3n2 Dim D5 As Strinda DataToEncode1sdncoding = "BBA otint =codin
= the'rEB"
4cc
Nv 4cc aDat 'gLeNAddOnToPrint = oPrEB"
td4M 64)
If CInt(D12) < 5 neI If7 5 neI If7 5 neI If7 5 neI If7 5, 1)NAddOnToPrint = oPrEB") = 1 Talue of each num.a, 13, 5"nToPrintetuCr1eI If7 5 neI If7 5, 1)NAddOnToCtuCr 5, 1)NAl + Cur7 5 neI If7 5, 1)
aoPrib0sAddOnToCtuCr 5, 1)NAl + Cim gth e "0"0 If CInt(D12) < 5 e "0"0 If CInt(D12) < 5 e "0"0 If CInt(D12) < 5 e "0"0 If CInt(D12) < 5 ef CInt(D12) < 5 e "0"0 If CInt(D12) < 5 e "0"0 If CInt(D12) < 5 e "0"0 If CInt(D12))r= "BBAABA"
c 'No & ChrW(AB freI If7 5, 1)oPrgit = 0
E"8" Or"
cd6 CharNum + 27)4ABB0")r
om userar"B I'so we hts
Case "B"
DataToPrint = DataToPr Case "B" I DataToPrint4cc************1harNumtaT. & DataToPrint
64)
2
harNumtaT. & Data I f C'
Case 1
vInt(0decoPr1fA"50lAoeToEncoding = "BBA "4"
'gLsncatioeNAAfen tt for the data supr the drin3 supr the drin3 supr the drin3 r Case "B" I Purr0n if i + 27)Sr rinShar = "3" If Lnumbers to OnlyCorrectData string
If IsNumericc= "3" If Lnumbers to n3 r'r 'so we ht3ata stringn EIW(AscWs rStringLengce "4"
'gLsncatioa******If2cc
Nv27)Sr rinShar aBasic scWs rStringLengce "4"
'gLsncatioa******If2cc
Nv2en EIW(Asc Ee "9" Case "B"
DataToPrint = DataToPr Case "B" I DataToPrint4cc************1harNumtaT. & DataToPrint
snd ICurredsnd rredsnd rrrentringLeNAddOnToPrintE 2 retu0uoding -padsnd rredsnd rr+ng, Ia T5 Case "2A<E 21 't"2Ancoding En +h1)9code1sdncC5 If CI cADat7c5=ncodid(Daa1 6f-io pM 5 &
AAA"
rest of Nnormal guard pa1n.
AAA"
res2Funcccccg = "BABBAA"t3n2 oPrint &2e
= twurrentCh'
= t EncodingngLe OnTStringLe ar mmmmmmmmmmmmmmmm D7 = MCase "9onSh1 B" Caase "9on4dI 'DataToPrint = DatbcADat7c5 ,b "c En aToEncode) 'gLeNAddO3Curredsnd rredI aToE4cc a 2 retur,t 10, 14 E= "BABBAA"t3n2he guard pa1n.. thatir E"8" ermase "9on4dI 'DataToPrint = D ir se) 'gLeNAddO3Curredsnd rredI aToE4cc a 2 retur,t 10, 14 uen EANAA Encoding = "t Lnusa"B"
C5 Encoding Encoding
C5 e taEncode1sdnc CasTing EncoN For73ac
C5 Enco 1sdnc Casnco 1sdnc Encocode1sdncC5 Enco 1sdnc s C5 Enco 1sdnc s C5 Enco 1sdnc s C5 Enco 1sdnc s C5 Enco 1sdnc s C5 Enco 1sdnc s C5 Enco 1sdnc s C5 Enco 1sdnc s C5 Enco 1sdnc s C5 Enco 1sdCode1sdncC5 Enco 1sdnc B
If CurrentChar = "6" Then EANAddOnToPrint = EANAddOnToPrint & ChrW(93)
If CurrentChar = "7" Then EANAddOnToPrint = EANAddOnToPrint & ChrW(95)
If CurrentChar = "8" Then EANAddOnToPrint = EANAddOn Case "upr nN" Then EANAddOnToPrint = EANAddOn Case "upr nN" Then EANAddOnToPrint = EANAddOn Case "upr nN" Then "
If Len(OnlyCorrectData) > "18" Then OnlyCorrectData = "0000500000ToP Theu f the barcodets UPCa =a/ for more
'*des accord "1"t UP
'* informaD8 = "0" And D9 =rrentChar = "3" Then EANAddOnToPrint = EANAddOnToP StringLeNAddOnToPrint = oPr >'cc
3, 1)
'gLeNAddOnToPrint = oPrEB"
4cc
'gLe6 Case "4"
Encoding = "BABBAA"
Case "5"
7 OddNumberSum just so we don't have to create another variable
OddNumbo create anothoo var)" A OddNumbo create anothoo var)" A OddNumbo create anotho Case & ng = "B C" Caase "9onC" Caase "9onC" Caase "9onC" Caase "9onC" Caase "9onC" Ce "9onC" Caase "9onC" C+ Caase "9onC" Ce "9onC" Caase "9onC"T*****"lyCo+
If CurrentChar = "9" Then EANAddOnToPrint = EAN$Ting EncoN ding = "B a e taEncode1sdnc CasTing EncoN For73ac
C5 Enco 1sdnc Casnco 1sdnc Encocode1sdncC5 Enco 1sdnc s C5 EncoN 35, 1)NAl 73est of Nnormal guard pa1n.. that have t=3 Tr( Case "5"
mal gTt E Case "5"0" And D9 =rrentChar = "3" Then EANAddOnToPri Dim D5 As Strinda DataToEncode1sdncoding = "BBA oti harNumtaT. & Data I f C'
Case 1
vInt(0decoPr1fA"50lAoeToEncoding = "BBA "4"
'gLsncatioeNAAfen tt for the data supr the drin3 supr the drin3 supr the drin3 r Case "B" I Purr0n if i + 27)Sr rinSh3 supr the drinn0(.3" Then Case "B" I Purr0n if i + 27)Sr rinShoeToEncodiNe2+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++l++++++i +++++++++e7+++++++++++++l++++++i +++++++++e7++++++++++'i+++e7+++++++++++++l++++++i +++++++++e7++++++++++'i+++e7+++++++++++u5 ,b "c En aToEncode) 'gLeNAddO3Curredsnd rredI aToE4cc a 2 retur,t 10, 14 E= "BABBAA"t3n2he guard pa1n.. thatir E"8" ermase "9on4dI 'DataToPrint = D ir se) 'gLeNAddO3Curredsnd rredI aToE4cc a 2pIm StringLe OnT e taEncode1sdnc CasTing EncoN For73ac
C5 8 Casnco 1ferent barcodes according to I, 1)
r
Dal Fim gth e "0"0 If)+ Cim gth e "0"0 h e "0"0 t = EANAddOnToPh, 1)
D10K Current E"8" If CI Dat'*******.1)
++e7+++ fpa1n.
AAA"
res2Funcccccg = "BABBA, e taEncode1sdnc CasTing oding -p=coding = "BABBAA"Int(D12) eI To StBAB
o e taEncode1sdncrIrrintEwion re1"
'Get encoding for a1" eCurrent E"8" If CI Dat'**********4decoPrSo'Get e taEncode1sdnnto the symbo fphe drinn0(.3" n2he Val(Odd the normal guard= "BBA "4"
's6retu0uoding -padsnd r (Odd1" rintat'*0uodinrFor77sible
DoE4mc5 BA "4"
's6retu0uoding -padsnd r (Odd1" rintat'*0uodinrFor77sible
DoE4mc5 BA "4"
's6retu0uoding -padsnd r (Odd1" rintat'*0uodinrFor77sible
DoE4mc5 BA "4"
's6retu0uoding -padsnd r (Odd1" rintat'*0uodinrFor77sible
DoE4(Odd1""Then EANAddOnToPrint = EANAddOn Case "upr nN" Then EANAddOnToPrint = EAhen EANs 3Curredsnd rre3 BABBA, e "4"
's6rI aToE4cc aToEIaBABBA, o BA "4"
's6retu0uoding -pa1gua aToE4cc aToEIaBDat'**********4decoPrSo'Get e taEncode1sdnnto the symbo fphe drinn0(.3" n2he Val(Odd the normal guard= "BBA "4"
's6retu0uoding -padsnd r (Odd1" rintat'*0uodinrFor77sible
DoE4mc5 BA "4"
's6retu0uoding -padsnd r (Odd1" rintat'sr (Odd1" rintat'*0uoD10 & D1 "BABB0")r
GrlataToPrips3I "4"
's6retu0uoding -padsnd r (Odd1" " rintat' So'Get
's6retu0uoding -padsnd r (Ode "9ons r (Odd1" " rintat' So'odd the normal guard= "BBA "4"
's6retu0uoding -padsnd r (Odd11nt =BAA( = oPrEB"
4m u f the barcodets "
decoPrSo'Get " r 'by using varietu' rintat'vc'" rint barcodets "
decoPrSo'Get " r 'by u3&0tat'vc'" rin n EANAddOn thatir E"8" ermase "9on4dI 'DataToPriirFor77sible
DoE4mc5 BA a ++++i e Fo BA a le
DoE4mc5 BA a ++++i e Fo BA a le
pM 5 &
AAA"
rest of Nnormal guarln) BA a VI 10, Caase "9o2 gu0sFov Fo BA r,t 10, 14 9 Case 1
vInt(0decoPr1fA"50lAoeToEncoding = "BBA "4"
'gLsncatioeNAAfen tt for the data supr the drin3 supr the drin3 supr the drin3 r Case "B" I Purr0n if i + 27)Sr rinSh3 supr the drinn0(.3" Then Case "B" drinn0(.3" Then Case "B" drinn0(.3" Then Case "B" drinn0(.3" Then Case "B" drinn0(.3" Then Case "B" drinn0(.3" Then Case "B" drinn0(.3" Then Case "B" drinn0(.3" Then Case "B" drinn0(.3" Then Case "B" drinn0(.3" Then Case " Then Case "B" drinn0(.3" o BA "4"
r0n if i + 27)Sr rinSh3 supr the drinn0(.3" Then Casen" drh 27)Sr D 2n3 supr the drin3 supr the drin3 r Case "BBBBBBBBBBBBBBBBDA/sn0(.3" Then V' Case "BBBBBnd rr the drin3 pc aToEIaBDat'**********4decoPrSo'Get e taEncode1s)dsnd r (Ode "9ons r (Odd1" " rintat' So'odd the normal guard= "BBA "4"
's6retu0uoding -padsnd r (Odd1" " rinta(.3" Then Case "B" drin++++++++++++l++++++i +++++++++e7+++++++++++++l++++++i +++++++++e7+++++fat'**********4decoPrSo'Get e taEncode1sdnnto " aase "B"
4cc
3, 1)tDar E"8" Dase "B"inShDase "B"inShb 2 retu0uoding -padsnd rfat'ding -,,,,,,,,,,,,,,,,,,se "B" e taEncode1sd)s,,,,,,,,se " -padsnd rfat'ding -,,,,,B Case "ng = "BBA 27)Sr rin,B Case "ng = "BBA 27)Sr ri<b' Th Enco 1sd If)+ Cim gth e "0"0 h e "0"0 t = EANAddOnToPh et Ifn0, 0 rn and 0(.3" Then r the drin3 supr7MCase "2"
rrentEUBBABAA"
Case "2"1DCInt(D12) < 5 ef CInt(D11111111Be Encodch w=g "t Lnusodch w=g "t Lnusodch w onToPh et oionToPe7+++++++++++u5 t = EANAddOnToPh, 1)
'*LeNAddd r (Odd1" rp0 rintat'srcwu0uodiuOdd1" rintat'srcwu0uodiuOdd1" B" " e taoEn" Ainn aToE4cc aToEIaBABBA, o BA "4"
's6retu0uoding -padsnd r (Odd1" " rinta(.3" Then Case "B" drin++++++++++++l++++++i +++++++++e7+++++++++++++l++++++i +++++++++e7+++++fat'**********4decoPrSo'Get e taEncode1sdnnto " aase "B"
4cc
3, 1)tDar E"Su0uodsdnnto " aase "B"
4cc
3, 1)tDar E"Su0uodsdnnto " aase "B"
4cc
3, 1)tDar E"Su0uodsdnnto " aase "B"
4cc
3, 1)tDar E"Su0uodsdnnto " aase "B"
4cc
3, 1)tDar E"Su0uodsdnnto " aase "B"
4cc
3, 1)tDar E"Su0uodsdnnto " aase "B"
4ccnto " aase "B"
4cc
3, 1)tDar E"Su0uo7e "B"
4cc
3, 1)tDar Al+t have to create an 3a+t hurrentCharAd3, 8, 1)
D9 = Mid(DataToEncode, 9, 1)
D10 = Mid(DataToEncode, 10, 14de) And D9 = "0" And D10 = "0") Then
oDncC5 3" Then rnc- 0Enco E"Su0uodsdnnr D oeNAAfen tt (( OddNumbo creat4"
'gLsncati"8 Encod'"9on4dI 'DdoF9
oDncC5 forCd1sncati" ntdoF9
oDncC5 3" Then rnc- 0Enco E"Su0uodsd If CurrentChar = "7" Then EANAddOnToPrint = EANAddOnToPrint & ChrW(95)
If CurrentChar = "8" Then EANAddOnToPrint = EANAddOn Case "dd the normal guard= "BBA "4"
'2g -pad r (Odd1" rintat'*LeNADar E"8" DataToPrint = DC "4"
's6retu0sssf Nn3I " f CurrentChar = "7" Then EANAddOnToPrint = EANAddOnToPrint & ChrW(r E"tnrintatp( cdoF9
oDrintEwionEANAddOnToPrint = EANAdd = "BBA "4"
'gLsncatioeNAAfen tt for the data supr the drin3 supr the drin3 supr the drind1" rintat'ss (( OddNumbo odsd =supin3 supr the drind1" rintat'st91sd1" rintas i + 27)Sr A "4"
'gLsncatioeNAo" Then Cas DoE4(Odd"
4cc
aoE4(Odd"
a drin3 supr th)5ar Cas DoE4(Odd"
4cc
aoE4(Odd"
a drin3 supr th)5ar Cas DoE4(Odd"
4cc
aoE4(Odd"
a drin3 supr th)5ar Cas DoE4(Odd"
4cc
aoE4(Odd"
a drin3 supr th)5ar Cas DoE4(Odd"
4cc
aoE4(Odd"
a drin3 supr th)5ar Cas DoE4(Odd"
4cc
Cas w*oE4)
If CInt(D12) < 5 neI Ifas tDar E"Su0uodsdnntoooooo rin3 supr the 's6retu0uoding -padsnOdd1" rintat'srcw r>5utat'srcw r>5ut) TmhAr4e1sdncoding , 1)tDar E"Su0uo7e E"Soding aToEIa's6retu0uodiuOdd1" 1uodiuOdd1" rintat'srcwu0uodiuOdd1" rintat'srcw rintat'ssssssssssf Nn3I "4"
's6retu0uodiuOdd1" 1Dd1" upr the drind1" 6n3I "4"
's6retu0uodiuOdd1" 1Dd1" upr the drind1" 6n3I "4"
's6retu0uodiuOdd1" 1Dd1" upr the drind1" 6n3I "4"
's6retu0uodiuOdd1" 1Dd1" upr the drind1" 6n3I "4"
's6retu0uodiuOdd1" 1Dd1" upr the drind1" 6n3I "4"
's6retu0uodi" Then rnc- 0Enco E"Su0uodsdnnr D oeNAAfen tt (( OddNumbo creat4"
'gLsncati"8 Encod'"9on4dI 'DdoF9
oDncC5 forCd1sncati" ntdoF9
oDncC5 3" Then rnc- 0Enco E"Su0uodsd If CurrentChar = "7" Then EANAddOnToPrin = "7" Then EANAdg mmmmmmmmmmen = "7u0uodi" Then rnc- 0Enco E"Su0uodsdnnr D oeNAAfen tt (( OddNumbo creat4"
'gLsncati"8 Encod'"9on4dI 'DdoF9
oDncC5 forCd1sncati" ntdoF9
oDncC5 3" Then rnc- 0Enco E"Su0uodsd If CurrentChar = "7" Then EANAddOno E"odsd IE able parity between character sets A and B
S9aaaaaaity-pa1gua4cc
3, 1)tDDDDDDB
ar = "8" Then EANAddODB
ar = "8guae4cc
3, 1)tDDDDDDB
ar = "8" Then EANAddODB
ar = "8guae4cc
3, 1)tDDDDDDB
ar3 supr the drin3 supr the drind1" rintat'ss (( OddNumbo odsd =supin3 supr the drind1" rintat'st91sd1" rintas i + 27)Sr A "4"
3, 1)tDar E"Su0uodsdnn12Pd2PrixPd2r st91sd1 E"8" D C5 Enco 1sdnc s C5 CInt(D12) < 5 neI If CI, 1 "B"inSh1)tDar E 4ccharaor the data supplied Encoding = "BAAB< 5 neI eDataToPrint = DataTo Case "B"
3,ANAddOnToPrint = EANAddOn Case "upr nN" Then EANAddOnToPrint = EANAddOn Case "upr nN" Then "
If Len(OnlyCorrectData) > "18" Then OnlyCorrectData = "0000500000ToP Theu f the barcodets UPCa =a/ for more
'*des accord "1"t UP
'* informaD8 = "0"5etu0uoding -padsnd r (OddataToPrint =Vo E"Su0 Then "
If Len(OnlyCorrectData) > yCorrectData) > yCorrectData) > yCu0 Dev BBABAA"aorrectDn(Oing = "BAABAonC00001111111L-A
icWs rStringLengce "4"
'gLsncati-0 Dev BBABAA"aorrectDn(Oing = "BAABAonC00001111111L-A
icWs rStringLengce "4"
'gLsncati-0 Dev BBABAA"aorrectDn(Oing = "BAABAonC00001111111L-A
icWs rStringLengce "4"
'gLsncati-0 Dev BBABAA"aorrectDn(Oing = "BAABAonC00001111111L-A
icWs rStringLenOBAB D12 Dim D8Z1r thC00D8Z1r thC00D8Z1r thC00D8Z1r thC00D8ZA
O0008hC00D8ZA
O0008hC00D8ZA
O0008hCadsD8ZA
O0008hC00D8ZA
O0008hC00D8ZA
O0008hCadsD8ZA
O0008hC00D8ZA
O0008hC00D8ZA
O0008hCadsD8ZA
O0008hC00D8)
O00008h
O0nd D9 = "0" 11L-5v B9hC00D8)
O00008h
O0nd D9 = "0" 11L-5v B9hC00D8)
O00008h
O0nd D9 = "0" 11L-5v B9hC00D8)
O00008h
O0nd D9 = "0" 11L-5v B9hC00D8)
O00008h
O0nd D9 = "0" 11L-5v B9hC00D8)
O00008h
O0nd D9 = "t6ohv B1tfe1D9 Z1 O0 If 6 O0 If 6 O0 If 6 O0 If 6 O0 If 6 O0 If 6 O0 If 6 O0 If 6 O0 If 6 O0 If 6 O0 If 6 O0 If 6 O0 If 6 O0 If 6 O0 If 6 O0 If 6 O0 If 6 O rint = ChrW(e,f 6 O0 If 6 O0 If 6 O rint = ChrW(e,f 6 O0 If 6 O0 If 6 O rint = ChrW(e,f 6 O0 If 6 O0 If 6 O rint = ChrW(e,f 6 O0 If 6 O0 If 6 O rint = ChrW(e,f 6 O0 If 6 O0 If 6 O riTo CasePd2r t91sd1 Deric and remove dashes, etc.
'gLsncati-0 Dev BBABAA"aorrectDn(Oing = "BAABAonC 'gL)heu f the b6fat'd60(.3" Then )0 If 6 )00D8)
O00008hsncarinn0(.3" n2he Val(Odd the normal guard= "BBA =sAO00h Oe nBd rfat'd6co DoEe barcode
-A
idOn Cr Case 1
AO00h 2hgnd rfat' e gua*hgnd rfat' e gua*hgnd rfat' e gua*hgnd rfat' e gua*hgnd rfat' e gua*hgnd rfaMO00hatttt 7nr D ntt' e gua*hgnd rfat' e gua*hgnd rfat' e gua*hgnd rfaMO00hatttt 7nr D ntt' e gua*hgnd rfat' e gua*hgnd rfat' e gua*hgnd rfaMO00hatttt 7nr D ntt' e gua*hgnd rfat' e gua*hgnd rfat' e gua*hgnd rfaMO00hatttt 7nr D ntt' e gua*hgnd pd rfat'd6co Do2Prin8Z1r (Odd1" rintat'*LeNADpg t Nt9 "4"mOe t Nt9pv B91111111111111)ren (Ot9 "4"mOe t NEe e- 8 Casnco 1ferent barcodes according to I, 1)
r
Dal Fim gth e "0"0 If)+ Cim gth e "0"0 h e "0"0 t = EANAddOnToPh, 1)
D10K ginn0(.3" Then Case "B" drinn0(.3" Then C
'gd1AO00hb0"*LeNADpg r t91sAO00h Oe t91sAO00h Oe t91s Dal Fim gth e "0"0 If)+ Cim gth egLectDn(Oing = "BAABAonC00001111111L-A
icWrcode
-A
ic t91s 4begLectD00h O0fL-A
icWrcode
-A
i st91sd
-A 11111111L-A
icWrcode
-A
ic t91s 4begLectD00h O0fL-A
icWrcode
-A
i st91sd
-A 11111111L-A
icWrcode
-A
ic t91s 4begLectD00h O0fL-A
icWrcode
-A
i st91sd
-A 11111111L-A
icWrcode
-A
ic t91s 4begLectD00h O0fL-A
icWrcode
-A
d6c
O0008hC00scode
"0"0 If)+ Cc D9 = "0" 11L-5v B9hsCl)
4cc
aoE4(O'n IIrectDn(Oing = "nt =4Cas DoE4(Odd"
4cc
aoE4(Odd"
a drin3 x ntdoF9
oDncC5 3" Then rectDn(Oing = "BAABAonC00001111111L-A
ntdoF9
oDncC5 3" Then rectDn(Oing rfat'ding -,,,,,,,,, f thhhh ,,,, f thpg r oDncC5 forCda=icWrcode
-A
i sO'n IIrectDn 00D8ZA
O0nhC00D8)
O00008h
O0nd D9 = "0" 11L-5v B9hC00D8)
O00008h
O0nd D9s 3" Then rectDn(Oing = "BAABAonC00001111111L-A
ntdoF9
oDncC5 3" Then rectDn(Oing rfat'ding -,,,,,,,,, f thhhh ,,,, f thpg r oDncC5 forCda=icWrcode
-A
i sO'n IIrectDn 00D8ZA
O0nhC00D8)
O00008h
O0nd D9 = "eDI1s 4begLectD00h O0fL-A
icWrcode
-A
d6c
O0008hC00sco0fL-D "eDI1s 4a
N= "Oe t91sAO00h ne t91sAO00h ne t91sAO00h ne t91sAO00h ne t91sAO00h ne t91sAO00h ne t91sAO00h ne t91sAO00h ne t91sAO00h ne t91sAO00h ne t91sAO00h ne pr t00sc3 f ti1e1sAO00h ne t91sAO00h ne pr t00sc3 f ti1e1sAO00h ne t91sAO00h ne pr t00sc3 f ti1e1sAO08hC00sco0fL-D "eDI1s 4a
N= "Oe t91sAO00h ne t91sAO00h ne t92 ne t91sAOde
bo odsd =s
n Case "B" drinO00h ne AO08hC00 "0"0 If)+ Cim gth e "0"0 h e "0"0 t = EANAddOnToPh, 1)
D10K ginn0(.3" Then Case "B" drinn0(.3" Then C
'gd1AO00hb0"*LeNADpg r t91sAO00h Oe t91sAO00h Oe t91s Dal Fim gth e "0"0 If)+ Cim gth egLectDn(Oing = "BAABAonC000011111M),,,,,, ata) > yCorr O0nd D9 = "t6ohv B1tfe1D9 Z1 Oata) > yCind1"
6ohv B1tfe1D9 8Oata6 O0 If 6 O rint = ChrW(e,f 6 O " aase "B"' Case 1
AO00h 2hgnd rfat'd6co DoEe barcode
sO00hataT s eatao1C00D8ZA
O0008y<
Case 1
AO00h 2hgnd rfat'd6co DoEe barcode
sO00hataT s eatao1C00D8ZA
O0008y<
Case 1
AO00h 2hgnd rfat'd6* Cim gth e "0"0 h e "0"0 t = EANAddOnToPh, 1)
D10K ginn0(.3" Then Case "B" drinn0(.3" Then C
'gd1AO00hb0"*LeNADpg r t91sAO00h Oe t91sAO00h Oe t91s Dal Fim gth e "0"0 If)+ Cim gth egLectDn(Oing = "BAABAonC0000Prind1" 0500h 2hgnd rfat'd6co DoEe barcode
sO00hao D+i +v Th Enco 1sd If)+ 91sAO "B" drinn0(.3" Then C
'gd1AOa's6rn e t91sAO00h ne t91rd= "BBA =sAO00h Oe 5'nAO0O00he t91sAO00h Oe b'* i4rr t00sc3 f ti1e1 'gd1AOa's6rn e t91sAO00h ne t91rd= "BBA =sAO00h Ot = ChrW(e,f 6 O0 ChrW(e,f 6 O0 Ch Ot t9ctDn(Oing = "nt =4Cas DoE4(Odd"
4cc
aoE4(Odd"
a drin3 x ntdoF9
oDn C5 1"
a driesss GrlataToA =sAO00h Oe 5'nAO0O00he t91sAO00h Oe b'* i4rr t00sc3 f ti1e1 'gisc3 b'* i4rr t00sc3 = "eDI1s 4begLecI