I'm trying to get Code 128 barcodes generated in Excel, through the use of VBA. I've found a VBA class that somebody made and shared via VBForums (subsequently modified to work with Excel VBA), but I'm having problems getting it to work. Code 128 Barcode Fonts encode numbers, symbols, uppercase and lowercase text as well as functions such as returns and tabs. All Code 128 barcode fonts require a start character, checksum character, and a stop character to create readable barcodes. BarcodeFactory offers a Free Online Barcode Generator! Create your own barcode online which can be scanned or downloaded. BarcodeFactory provides Aztec, DataMatrix, QR Code, PDF417, Code 128, Code 39, UPC, and many more with our free barcode generator tool. Call or Chat with our Barcode.
Code128 Barcode
Code128 barcode is currently one of the most widely used barcode. The reason is that this barcode can support the full ASCII character set, is flexible and can support very dense (number of characters per inch) barcode. Under the industry specifications, this barcode supports three different variations : Code 128 A, Code 128 B and Code 128 C. Each of the variations is targeted for specific purposes and switching between the different variations is possible with additional control characters. With the switching, the specifications also cater to an Auto mode to help users create the barcode easily. The Auto mode allows the barcode software to auto detect the data, determine the most optimized variation and, if required, switch between the variations automatically. It is recommended to use the Barcode Generator, the Excel Add in or other tools provided by Aeromium for the Auto mode.
Generating this barcode using the Barcode Generator
The easiest way to create this barcode is to use the Barcode Generator included in the installation package. Simply goto the Start Menu and launch Aeromium Barcode Fonts > Barcode Generator. This software automatesand simplifies the creation of the barcodes for you. After the barcode is created, you can simply copyand paste the barcode into your documents.
Generating this barcode using the Barcode Generator
Generating this barcode in Excel
Code 128 Barcode Fonts
The following is the list of fonts with varying heights supported by Aeromium. All the different variations of this barcode use the same set of fonts below.
FontCode128H1.ttf
FontCode128H2.ttf
FontCode128H3.ttf (Default Font)
FontCode128H4.ttf
FontCode128H5.ttf
FontCode128H6.ttf
Using this Barcode Manually
Code 128 AThe following table lists the characters supported by the Code 128 A barcode. The first column represents your data characters to be encoded by the barcode. The second column represents the barcode font characters to use. The Barcode Generator and Excel Macros will automatically help translate the data to the barcode font character and compute the check character. The characters for mode (variation) switching are also included in the table below. It is recommended to use the Barcode Generator, the Excel Add in or other tools provided by Aeromium for the Auto mode. This is to prevent human errors when creating the barcodes.
Data to be Encoded | Font Character to use | Values used for calculating Check Character |
' ' | ' ' (Space) | 0 |
'!' | '!' | 1 |
'' | '' | 2 |
'#' | '#' | 3 |
'$' | '$' | 4 |
'%' | '%' | 5 |
'&' | '&' | 6 |
'' | '' | 7 |
'(' | '(' | 8 |
')' | ')' | 9 |
'*' | '*' | 10 |
'+' | '+' | 11 |
',' | ',' | 12 |
'-' | '-' | 13 |
'.' | '.' | 14 |
'/' | '/' | 15 |
'0' | '0' | 16 |
'1' | '1' | 17 |
'2' | '2' | 18 |
'3' | '3' | 19 |
'4' | '4' | 20 |
'5' | '5' | 21 |
'6' | '6' | 22 |
'7' | '7' | 23 |
'8' | '8' | 24 |
'9' | '9' | 25 |
':' | ':' | 26 |
';' | ';' | 27 |
'<' | '<' | 28 |
'=' | '=' | 29 |
'>' | '>' | 30 |
'?' | '?' | 31 |
'@' | '@' | 32 |
'A' | 'A' | 33 |
'B' | 'B' | 34 |
'C' | 'C' | 35 |
'D' | 'D' | 36 |
'E' | 'E' | 37 |
'F' | 'F' | 38 |
'G' | 'G' | 39 |
'H' | 'H' | 40 |
'I' | 'I' | 41 |
'J' | 'J' | 42 |
'K' | 'K' | 43 |
'L' | 'L' | 44 |
'M' | 'M' | 45 |
'N' | 'N' | 46 |
'O' | 'O' | 47 |
'P' | 'P' | 48 |
'Q' | 'Q' | 49 |
'R' | 'R' | 50 |
'S' | 'S' | 51 |
'T' | 'T' | 52 |
'U' | 'U' | 53 |
'V' | 'V' | 54 |
'W' | 'W' | 55 |
'X' | 'X' | 56 |
'Y' | 'Y' | 57 |
'Z' | 'Z' | 58 |
'[' | '[' | 59 |
' | ' | 60 |
']' | ']' | 61 |
'^' | '^' | 62 |
'_' | '_' | 63 |
NUL | '`' | 64 |
SOH | 'a' | 65 |
STX | 'b' | 66 |
ETX | 'c' | 67 |
EOT | 'd' | 68 |
ENQ | 'e' | 69 |
ACK | 'f' | 70 |
BEL | 'g' | 71 |
BS | 'h' | 72 |
HT | 'i' | 73 |
LF | 'j' | 74 |
VT | 'k' | 75 |
FF | 'l' | 76 |
CR | 'm' | 77 |
SO | 'n' | 78 |
SI | 'o' | 79 |
DLE | 'p' | 80 |
DC1 | 'q' | 81 |
DC2 | 'r' | 82 |
DC3 | 's' | 83 |
DC4 | 't' | 84 |
NAK | 'u' | 85 |
SYN | 'v' | 86 |
ETB | 'w' | 87 |
CAN | 'x' | 88 |
EM | 'y' | 89 |
SUB | 'z' | 90 |
ESC | '{' | 91 |
FS | '|' | 92 |
GS | '}' | 93 |
RS | '~' | 94 |
US | ASCII 176 | 95 |
FNC3 | ASCII 177 | 96 |
FNC2 | ASCII 178 | 97 |
Shift | ASCII 179 | 98 |
Code C | ASCII 180 | 99 |
Code B | ASCII 181 | 100 |
FNC4 | ASCII 182 | 101 |
FNC1 | ASCII 183 | 102 |
Start A | ASCII 184 | 103 |
Start B | ASCII 185 | 104 |
Start C | ASCII 186 | 105 |
Stop | ASCII 187 | 106 |
Code 128 B
The following table lists the characters supported by the Code 128 B barcode. The first column represents your data characters to be encoded by the barcode. The second column represents the barcode font characters to use.
Data to be Encoded | Font Character to use | Values used for calculating Check Character |
' ' | ' ' (Space) | 0 |
'!' | '!' | 1 |
'' | '' | 2 |
'#' | '#' | 3 |
'$' | '$' | 4 |
'%' | '%' | 5 |
'&' | '&' | 6 |
'' | '' | 7 |
'(' | '(' | 8 |
')' | ')' | 9 |
'*' | '*' | 10 |
'+' | '+' | 11 |
',' | ',' | 12 |
'-' | '-' | 13 |
'.' | '.' | 14 |
'/' | '/' | 15 |
'0' | '0' | 16 |
'1' | '1' | 17 |
'2' | '2' | 18 |
'3' | '3' | 19 |
'4' | '4' | 20 |
'5' | '5' | 21 |
'6' | '6' | 22 |
'7' | '7' | 23 |
'8' | '8' | 24 |
'9' | '9' | 25 |
':' | ':' | 26 |
';' | ';' | 27 |
'<' | '<' | 28 |
'=' | '=' | 29 |
'>' | '>' | 30 |
'?' | '?' | 31 |
'@' | '@' | 32 |
'A' | 'A' | 33 |
'B' | 'B' | 34 |
'C' | 'C' | 35 |
'D' | 'D' | 36 |
'E' | 'E' | 37 |
'F' | 'F' | 38 |
'G' | 'G' | 39 |
'H' | 'H' | 40 |
'I' | 'I' | 41 |
'J' | 'J' | 42 |
'K' | 'K' | 43 |
'L' | 'L' | 44 |
'M' | 'M' | 45 |
'N' | 'N' | 46 |
'O' | 'O' | 47 |
'P' | 'P' | 48 |
'Q' | 'Q' | 49 |
'R' | 'R' | 50 |
'S' | 'S' | 51 |
'T' | 'T' | 52 |
'U' | 'U' | 53 |
'V' | 'V' | 54 |
'W' | 'W' | 55 |
'X' | 'X' | 56 |
'Y' | 'Y' | 57 |
'Z' | 'Z' | 58 |
'[' | '[' | 59 |
' | ' | 60 |
']' | ']' | 61 |
'^' | '^' | 62 |
'_' | '_' | 63 |
'`' | '`' | 64 |
'a' | 'a' | 65 |
'b' | 'b' | 66 |
'c' | 'c' | 67 |
'd' | 'd' | 68 |
'e' | 'e' | 69 |
'f' | 'f' | 70 |
'g' | 'g' | 71 |
'h' | 'h' | 72 |
'i' | 'i' | 73 |
'j' | 'j' | 74 |
'k' | 'k' | 75 |
'l' | 'l' | 76 |
'm' | 'm' | 77 |
'n' | 'n' | 78 |
'o' | 'o' | 79 |
'p' | 'p' | 80 |
'q' | 'q' | 81 |
'r' | 'r' | 82 |
's' | 's' | 83 |
't' | 't' | 84 |
'u' | 'u' | 85 |
'v' | 'v' | 86 |
'w' | 'w' | 87 |
'x' | 'x' | 88 |
'y' | 'y' | 89 |
'z' | 'z' | 90 |
'{' | '{' | 91 |
'|' | '|' | 92 |
'}' | '}' | 93 |
'~' | '~' | 94 |
DEL | ASCII 176 | 95 |
FNC3 | ASCII 177 | 96 |
FNC2 | ASCII 178 | 97 |
Shift | ASCII 179 | 98 |
Code C | ASCII 180 | 99 |
FNC4 | ASCII 181 | 100 |
Code A | ASCII 182 | 101 |
FNC1 | ASCII 183 | 102 |
Start A | ASCII 184 | 103 |
Start B | ASCII 185 | 104 |
Start C | ASCII 186 | 105 |
Stop | ASCII 187 | 106 |
Code 128 C
The following table lists the characters supported by the Code 128 C barcode. The first column represents your data characters to be encoded by the barcode. The second column represents the barcode font characters to use.
Data to be Encoded | Font Character to use | Values used for calculating Check Character |
00 | ' ' (Space) | 0 |
01 | '!' | 1 |
02 | '' | 2 |
03 | '#' | 3 |
04 | '$' | 4 |
05 | '%' | 5 |
06 | '&' | 6 |
07 | '' | 7 |
08 | '(' | 8 |
09 | ')' | 9 |
10 | '*' | 10 |
11 | '+' | 11 |
12 | ',' | 12 |
13 | '-' | 13 |
14 | '.' | 14 |
15 | '/' | 15 |
16 | '0' | 16 |
17 | '1' | 17 |
18 | '2' | 18 |
19 | '3' | 19 |
20 | '4' | 20 |
21 | '5' | 21 |
22 | '6' | 22 |
23 | '7' | 23 |
24 | '8' | 24 |
25 | '9' | 25 |
26 | ':' | 26 |
27 | ';' | 27 |
28 | '<' | 28 |
29 | '=' | 29 |
30 | '>' | 30 |
31 | '?' | 31 |
32 | '@' | 32 |
33 | 'A' | 33 |
34 | 'B' | 34 |
35 | 'C' | 35 |
36 | 'D' | 36 |
37 | 'E' | 37 |
38 | 'F' | 38 |
39 | 'G' | 39 |
40 | 'H' | 40 |
41 | 'I' | 41 |
42 | 'J' | 42 |
43 | 'K' | 43 |
44 | 'L' | 44 |
45 | 'M' | 45 |
46 | 'N' | 46 |
47 | 'O' | 47 |
48 | 'P' | 48 |
49 | 'Q' | 49 |
50 | 'R' | 50 |
51 | 'S' | 51 |
52 | 'T' | 52 |
53 | 'U' | 53 |
54 | 'V' | 54 |
55 | 'W' | 55 |
56 | 'X' | 56 |
57 | 'Y' | 57 |
58 | 'Z' | 58 |
59 | '[' | 59 |
60 | ' | 60 |
61 | ']' | 61 |
62 | '^' | 62 |
63 | '_' | 63 |
64 | '`' | 64 |
65 | 'a' | 65 |
66 | 'b' | 66 |
67 | 'c' | 67 |
68 | 'd' | 68 |
69 | 'e' | 69 |
70 | 'f' | 70 |
71 | 'g' | 71 |
72 | 'h' | 72 |
73 | 'i' | 73 |
74 | 'j' | 74 |
75 | 'k' | 75 |
76 | 'l' | 76 |
77 | 'm' | 77 |
78 | 'n' | 78 |
79 | 'o' | 79 |
80 | 'p' | 80 |
81 | 'q' | 81 |
82 | 'r' | 82 |
83 | 's' | 83 |
84 | 't' | 84 |
85 | 'u' | 85 |
86 | 'v' | 86 |
87 | 'w' | 87 |
88 | 'x' | 88 |
89 | 'y' | 89 |
90 | 'z' | 90 |
91 | '{' | 91 |
92 | '|' | 92 |
93 | '}' | 93 |
94 | '~' | 94 |
95 | ASCII 176 | 95 |
96 | ASCII 177 | 96 |
97 | ASCII 178 | 97 |
98 | ASCII 179 | 98 |
99 | ASCII 180 | 99 |
Code B | ASCII 181 | 100 |
Code A | ASCII 182 | 101 |
FNC1 | ASCII 183 | 102 |
Start A | ASCII 184 | 103 |
Start B | ASCII 185 | 104 |
Start C | ASCII 186 | 105 |
Stop | ASCII 187 | 106 |
Examples
Code 128A
To encode the data 'TESTIT' without the check digit manually, simply key in '[ASCII 184]TESTITm[ASCII 187]' and select the FontCode128H3.ttf font. The output is as follows :
The 'm' is the check character and its computation is illustrated in the next section below. [ASCII 184] is the start character of Code 128 A while [ASCII 187] is the stop character of Code 128 A.
Code 128B
To encode the data 'testit' without the check digit manually, simply key in '[ASCII 185]testit=[ASCII 187]' and select the FontCode128H3.ttf font. The output is as follows :
The '=' is the check character and it's computation is illustrated in the next section below. [ASCII 185] is the start character of Code 128 B while [ASCII 187] is the stop character of Code 128 B.
Code 128C
To encode the data '12345678' without the check digit manually, simply key in '[ASCII 186],BXnO[ASCII 186]' and select the FontCode128H3.ttf font. The output is as follows :
',' represents '12'
'B' represents '34'
'X' represents '56'
'n' represents '78'
The 'O' is the check character and it's computation is illustrated in the next section below. [ASCII 186] is the start character of Code 128 C while [ASCII 187] is the stop character of Code 128 C.
How to compute the check digit
Code 128ABarcode 128 Tab
Data - TESTIT
Data to be Encoded | T | E | S | T | I | T |
Multiply each of the character (the Code 128 value) with an increasing weight. | ||||||
Check Character Values | 52 | 37 | 51 | 52 | 41 | 52 |
Weight | *1 | *2 | *3 | *4 | *5 | *6 |
Sum : | (52*1) + (37*2) + (51*3) + (52*4) + (41*5) + (52*6) = 1004 | |||||
For Code 128A barcode, add 103 to the sum above | ||||||
Total | 1004 + 103 = 1107 | |||||
Check Character (Modulo 103) : | 1107 % 103 = 77 (which is represented by the character 'm') |
Code 128B
Barcode 128 Ttf
Data - testitData to be Encoded | T | E | S | T | I | T |
Multiply each of the character (the Code 128 value) with an increasing weight. | ||||||
Check Character Values | 84 | 69 | 83 | 84 | 73 | 84 |
Weight | *1 | *2 | *3 | *4 | *5 | *6 |
Sum : | (84*1) + (69*2) + (83*3) + (84*4) + (73*5) + (84*6) = 1676 | |||||
For Code 128B barcode, add 104 to the sum above | ||||||
Total | 1676 + 104 = 1780 | |||||
Check Character (Modulo 103) : | 1780 % 103 = 29 (which is represented by the character '=') |
Code 128C
Data - 12345678
Data to be Encoded | 12 | 34 | 56 | 78 | ||
Multiply each of the character (the Code 128 value) with an increasing weight. | ||||||
Check Character Values | 12 | 34 | 56 | 78 | ||
Weight | *1 | *2 | *3 | *4 | ||
Sum : | (12*1) + (34*2) + (56*3) + (78*4) = 560 | |||||
For Code 128C barcode, add 105 to the sum above | ||||||
Total | 560 + 105 = 665 | |||||
Check Character (Modulo 103) : | 665 % 103 = 47 (which is represented by the character 'O') |
Back to Barcode Fonts.
Which scanner is required to display RS and GS characters (Resolved) 0 - In Release Log (AccessBG) - Asked By saiswarupsahu - 72 day(s) ago - 1 Answer or Comment
| |
Natalie | How to encode RS GS EOT in QR-Code Access Native Barcode Generator (Resolved) 0 - In Office Macros & VBA - Asked By Natalie - 1054 day(s) ago - 1 Answer or Comment
|
0 - In PDF417 - Asked By - 1246 day(s) ago - 1 Answer or Comment
| |
Dutch | 0 - In Label Software - Asked By Dutch - 1372 day(s) ago - 1 Answer or Comment
|
EdMerkle | Data Matrix ECC-200 Format 06 in Crystal Report (Resolved) 0 - In Image Generator - Asked By EdMerkle - 1594 day(s) ago - 1 Answer or Comment
|
tdawgcj7 | Direct Encoding Lower ASCII in PDF417 Native for Crystal Reports (Resolved) 0 - In Crystal Reports Barcode Generator - Asked By tdawgcj7 - 1918 day(s) ago - 1 Answer or Comment
|
jim9900 | 0 - In Data Matrix - Asked By jim9900 - 1991 day(s) ago - 1 Answer or Comment
|
sschultz | RS, GS, and EOT in DataMatrix Using the Crystal Reports Native (Resolved) 0 - In Crystal Reports Barcode Generator - Asked By sschultz - 2085 day(s) ago - 1 Answer or Comment
|
DPK | IDAutomation fonts with eot, woff and svg extension (Resolved) 0 - In Premiere Barcode Package - Asked By DPK - 2780 day(s) ago - 5 Answer or Comment
|
Brant | How can we embed Barcode, MICR or OCR Fonts in HTML? (Resolved) 0 - In Barcode Fonts - Asked By Brant - 3084 day(s) ago - 2 Answer or Comment
|
txnguyen | Capturing ACSII control characters GS,RS, EOT on web form. (Resolved) 0 - In Barcode Components - Asked By txnguyen - 3250 day(s) ago - 2 Answer or Comment
|
txnguyen | Encode GS, RS separators and EOT does not work in the Java Component. (Resolved) 0 - In Java Barcode Package - Asked By txnguyen - 3346 day(s) ago - 16 Answer or Comment
|
txnguyen | How to encode the GS, RS and EOT in PL/SQL? (Resolved) 0 - In Java Barcode Package - Asked By txnguyen - 3359 day(s) ago - 1 Answer or Comment
|