Barcode and VBA

I

Ice

hi,

I use windows xp prof and office xp prof. i n excel i have add-in that
generates for me bar code on the worksheet.
i took add-in from www.abarcode.net and it is demo version. i have macro
that does few steps for me. this steps are:

1)copy value from cell A5 into N5
2)print a page with new barcode value
3)copy next value from A6 into N5
4)print a page with new barcode value
.....

a there can be many values in A column and macro run to the last one that is
not empty.

and here is my problem:

every printed page has always barcode with latest value from list, whenever
macro goes normaly. i wanted to check exactly how does it goes and i used
"step into" option of running macro. during this controled run everything
was fine and each page has printed correctly with proper barcode.

do you know how can i make this macro to print correctly on every single
page?or what is the reason of such behavior?

thanks in advance
 
N

NickHK

Not sure I understand the problem, as you say it run fine normally and
stepping through the code.
Either way, some code of the problem area would help.

NickHK
 
I

Ice

Stepping through the code means that i press F8 and i see every single step
the macro does.
Abarcode activeX add-in generates barcode from value that is placed in N5
cell.
code is:

dim idRow
for idRow = 5 to 10
range("N5").select
selection.value = cstr("=A") +cstr("idRow")
ActiveWindow.SelectedSheets.PrintOut Copies:=1
next idRow


any idea?
 
D

David McRitchie

The barcode is a font, the macro is not drawing the lines,
it is probably just creating a check digit and possibly
setting the format of the cell to the barcode font.

You can get free barcodes and algorithms in functions
or macros to calculate check digits. See my page
http://www.mvps.org/dmcritchie/excel/mailmerg.htm#barcode
and you can find freeware, shareware, and payfor
barcode applications, entirely your choice.
 

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