Using a VB Script for barcodes - new to this

J

Jon

Hello group,

Wonder if someone can help.

I'm attempting to create a sheet of barcodes. I've found some barcode
fonts and a VB script which when used together produce results that
work, I.e. valid barcodes.

The process is thus: I use this script to input a 12 digit number, when
I press "generate" the script turns my 12 digits into a string of
characters. I then paste this string of characters into an excel cell
and format it using the barcode font. The result is a barcode which when
sized up to 48 and printed works on my barcode scanner.

What I want to do is to be able to utilised this script somehow in excel
but I have no idea how to do this.

Ideally What I want to do is take the contents of cell A2, put it
through this script and dump the output into cell A1.

Is this possible?
 
G

Guest

there's a type of barcode that is very easy to use: code 39. There are many
free fonts out on the internet.

http://www.bizfonts.com/free/

for code 39 you need to add the "*" character to the number (or A-Z
character) you want to get into the code.

if you have a code in A2, and you want the barcode in a1
you would type in a1

="*" & trim(A2) & "*"

and you need to set A1 to the code39 font

hope that helps!
 
T

Thomas Lutz

You should be able to put the VB script code in a VBA module in Excel
and then run the script as a macro. The first step is to learn how to
use the VBA editor in Excel. A good place to start learning is the
following article:
http://www.taltech.com/support/sw_tricks/exmacros.htm

In general, bar code fonts produce extremely poor quality bar codes
that can be difficult to read and they are also usually not very
"device independent" meaning that different printers will output them
differently and you might get readable bar codes when you print to one
printer and then get unreadable bar codes when you print to a
different printer.

If you want perfectly readable bar codes no matter what printer you
print to, then you are much better off using a good quality bar code
ActiveX control that produces Windows metafile (device independent)
graphic images of bar codes.

The absolute best one on the market is from TAL Technologies. You can
download a demo of their control from the following web page:
http://www.taltech.com/products/activex_barcodes.html

The demo comes with a sample Excel spreadsheet that demonstrates how
to use it to print bar codes in Excel. Basically you drop the control
onto your spreadsheet and then "bind" the control to a "Linked Cell"
so that the bar code data is linked directly to the cell containing
the data that you want to encode. When you print your spreadsheet, you
get perfect bar codes encoding your data. You also do not have to
modify your data in any way whatsoever or write any VBA code at all.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top