Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Jon
 
Posts: n/a
Default Using a VB Script for barcodes - new to this

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?
--
Regards
Jon
  #2   Report Post  
Mexage
 
Posts: n/a
Default

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!

"Jon" wrote:

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?
--
Regards
Jon

  #3   Report Post  
Thomas Lutz
 
Posts: n/a
Default

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.




On Wed, 4 May 2005 14:34:24 +0100, Jon
wrote:

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?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Read only password script box Joey041 Excel Discussion (Misc queries) 1 May 3rd 05 01:23 AM
Can somebody check my script?? Anthony Excel Discussion (Misc queries) 3 March 2nd 05 09:31 AM
Macro script error - pls help !! Anthony Excel Discussion (Misc queries) 3 February 28th 05 01:49 PM
Script Error Mike Excel Discussion (Misc queries) 1 January 29th 05 12:32 AM
How do I get the trendline equation from Excel to script? Mattias Charts and Charting in Excel 1 December 7th 04 12:21 PM


All times are GMT +1. The time now is 08:55 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"