Skip to main content

Search

Search

Vb Script To Print Labels In Increments Or Decriments At Value Inputted At Prompt Dialog

Comments

5 comments

  • Avatar
    Ian Cummings
    Moderator

    Find attached an old example of a BarTender document file that does the serial number range this you're requesting.  I hope it helps.

    0
  • Avatar
    Legacy Poster

    Hi Ian

    Thanks for replying

     

    I have attached my btw file so you can have a look

     

    What I have setup is the user inputs the start of the serialised number

    The user select the no of serialised labels when printing

     

    Sometimes we need the label to incremented. Say for example by 3

     

    So if the user inputs starting number as 001 and during printing selects number of serialised labels as 5

    Bartender prints 5 labels as below

    Label 1 - 001

    Label 2 - 004

    Label 3 - 007

    Label 4 - 010

    Label 5 - 013

     

    At the moment if we need the labels to be incremented by 4, I have to go and change it to 4 in the Serialization Tab in More Data Source Options

    Then it prints in increments of 4

     

    My question is it possible to be able to change the increment value at the prompt stage

    If the labels need to be increment by 2 the user inputs 2 and labels print with that value

     

    That way I don't need to go and modify the label every time we need to increment at a different value

     

    Thanks and Regards

    Rahul

     

    0
  • Avatar
    Ian Cummings
    Moderator

    In BarTender v10.1 this is easy as you can specify a data source value, which you can make a user prompted item, for both the increment amount and the increment interval.  See the attached image.  To do this in your current version you'd need to not use the BarTender serialization feature at all, and instead implement an event based VB script to handle the serialization of the labels.

    0
  • Avatar
    Legacy Poster
    Hi Ian
    Would you be able to guide me on implementing an event based VB script?
    I haven't done it before, but would love to try
    Would you have some examples that I can refer too & copy

    Thanks & Regards
    Rahul
    0
  • Avatar
    Ian Cummings
    Moderator

    Sorry, but my recommendation would be to get a newer version of BarTender.

     

    In the VB scripts you set the value of the data source by way of the expression: value = X

     

    Use a variable to keep the running value of the serial number, and using the "OnIdenticalCopies" event you'd increment the serial value with a X = X +1 or perhaps with  X = X + Format.NamedSubStrings("BTIncrementAmount").Value

    1

Please sign in to leave a comment.