Dear, I have the following procedure to make labels with tbarcode
when I execute it step by step or if I delete and re-add the object tbarcode10
works ok, when I execute it from button no. It has a loop to modify the data that create the bar codes of the tag.
The variable i
is the one that is increasing according to the labels to be made, at the end of the loop it leaves the text of the tbar updated, but not when printing the labels, it always leaves the same value of the letter i
, even though it is changing normally.
Here part of the procedure.
Could you help me? Thanks.
Do While i <= diferencia
j = Format(Hoja1.txtfecha.Text, 0) + Format(Hoja1.cbproducto.Value, "00") + Format(Hoja1.txtcabeza.Text, "00") + Format(i, "0000")
tbar.Text = j
Hoja2.Cells(1, 1) = Hoja1.cbproducto.Text
Hoja2.Cells(2, 2) = Hoja1.txtfechav.Text
Hoja2.Cells(2, 3) = Hoja1.txtcabeza.Text
i = i + 1
Hoja2.PrintPreview
Loop