Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating barcodes through VB

Status
Not open for further replies.

bradth

IS-IT--Management
Feb 18, 2005
142
CA
I'm currently using VBA (or possibly VB6) and an Intermec 3240 with Printset v2.2. What I would like to do is create a form in VB that when print is pressed, a barcode is created and printed out.
Ex:

||||||||||||||| (barcode)
123456 (text)

A very simple barcode that just has the barcode on top and text on the bottom on a 0.75"x05" label. Does anyone have a VB example of how I would go about doing this? I have the manual with all of the intermec commands, but I still don't quite understand how I can get this to print using VB. Currently I have a form created that has box for the text and a box for the qty to be printed, as well a print button. Any feedback would be much appreciated. Thanks in advance.

Brad [spidey]
 
bradth,
have not done this with vb or vba but have done it in other languages.
what i have done in the past is to build a string for the barcode that includes the ipl commands along with the actual data. you then issue the string to the printer (put, display, etc.)
hth
regards,
longhair
 
faq694-2608
This FAQ is for Zebra Printers but it can be adapted for any printer.
Basically you design a label in a design program and then print it to a file instead of the printer. All of these barcode printers use ESC codes to print this will create an ASCII text file. These ESC code can be sent directly to the printer with out any driver or software and create a label. Next you open that file determine where the actual data is from the ESC characters. You modify this ESC character codes so your VB app puts in variable data in between the ESC code sequences. Basically you are creating a Template with variables for your data. The FAQ shows an example of this.




DougP, MCP, A+
 
Another solution is to use one of the Barcode design and print solutions such as Seagull Scientifics Bartender. I use this solution in a VB.NET manufacturing solution and it runs pretty well. The enterprise product has an ActiveX Control that can be used from VBA/VB6.
 
Another solution is to load a barcoding font into your printer, and use the right escape codes to print that font. Some software fonts are freeware. years ago I purchased a factory ROM to add barcodes to an Output Technology Corp three-head impact printer. Worked very well coding from Revelation RBasic.

Fred Wagner

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top