Well code39's quite an easy one, luckily. It contains no check digits or code switches and complications of that nature. All you need is to add a * to the front and back. So if the thing you want to barcode is say a Part Number like ABC-12345-RevB, then the string you need to send is just *ABC-12345-RevB*. The *'s just alert the reader to the fact that here comes a barcode, and that it's ended.
Of course, you need to procure a font, eg from Elfring at http:\\
Oops, I meant to add this, too. This guy Cesar Vezga has provided code to print code39 with no font which is really great if you can't or won't buy and deploy the font allround your company. He literally draws the lines. Get it at
I also tried to print same , Product# 998152, using Word with BC C39 font. They both look the same to me.
However, the scanner doesnt pick them up. I am using Symbol LS1908 scanner.
There is an example of 39 barcode from Zebra manual of #998152, showing different shape, that the scanner picks without any problem.
As Jim pointed out, Code39 always needs an asterisk as the start and stop character. With the way Code39 is encoded, all Code39 barcodes start and end with the same sequence of 9 bars and spaces. Namely:
narrow bar
wide space
narrow bar
narrow space
wide bar
narrow sapce
wide bar
narrow space
narrow bar
Note 3 of the elements are wide: therefore 3 of 9, or 39.
Mike
but am having trouble with the reference to "pictObj" and "Printer". I am not new to vb, however I have never worked with the controls referenced in this post. Does anybody who has worked with this code before have a couple of pointers? Specifically I am trying to drop the barcode into a form based on a textbox value.
I'm not quite sure if u r wanting to create or read a barcode. I did try that source codes, and it prints succesfully a 3of9 barcode from a textbox I have in a Form.
Anyhow, my scanner couldnt read it properly, so I tried this other tip posted by Rookie...
i.e. by downloading a barcode Font from
to your Font Settings. And use it in VB as if u use a normal font such as
Printer.Fontname = such and such
Printer.Print = "*" & Text1.text & "*"
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.