Skip to main content

Search

Search

Box Number Of Number Vba Help

Comments

8 comments

  • Avatar
    Legacy Poster

    Are you doing this through external VB.net automation? Or are you looking for help doing the VBA inside BarTender?

    0
  • Avatar
    Legacy Poster

    Are you doing this through external VB.net automation? Or are you looking for help doing the VBA inside BarTender?

     

    VBA inside BarTender, on the properties of a text box.

    0
  • Avatar
    Legacy Poster

    Wouldn't it be easier to set the field to be equal to the qty you need and use the decrement function?  this would give you labels in reverse ... 

     

    30 of 30

    29 of 30

    28 of 30 ... and so on.

    0
  • Avatar
    Michael Toupin (mtoupin

    If you're using 10.1, you can achieve this without doing any scripting by just setting the reset to 'per database record'.  

     

    To do it using VB, create an "OnNewRecord" event and just do 'value = 1'.  That way it will reset per record.

    0
  • Avatar
    Legacy Poster

    Wouldn't it be easier to set the field to be equal to the qty you need and use the decrement function?  this would give you labels in reverse ... 

     

    30 of 30

    29 of 30

    28 of 30 ... and so on.

    How would I then reset the value to be equal to a new number of?

     

    If you're using 10.1, you can achieve this without doing any scripting by just setting the reset to 'per database record'.  

     

    To do it using VB, create an "OnNewRecord" event and just do 'value = 1'.  That way it will reset per record.

    I'll see what I can do, currently BarTender isn't on my machine so I can't do much with it right now!

    0
  • Avatar
    Legacy Poster

    For each new record being printed the value would reset.  Maybe I am misunderstanding your requirements but for each record the qty value woul dbe set by either a database field or a user input and that field would two seperate objects on the label.  One that is static and one that is set to decrement.

    0
  • Avatar
    Legacy Poster

    For each new record being printed the value would reset.  Maybe I am misunderstanding your requirements but for each record the qty value woul dbe set by either a database field or a user input and that field would two seperate objects on the label.  One that is static and one that is set to decrement.

     

    I might not have explained it very well either.The number of copies is set to a datasource value, ie the number of boxes in the spreadsheet. Then for each copy, I want this field to say "1 of", "2 of" etc, until it hits the same value as the number of boxes, and then moves on to the next record, doing the same thing.

    0
  • Avatar
    Legacy Poster

    Right I've kind of got this working, but I'm having a bit of a moment here.

     

    On the newrecord event, I have the value of the FirstNumber set to equal the value of the SecondNumber. Then on the identicalcopies event, I have Value = Value - 1.

     

    Problem is, the first record then starts at 1 less than it should be, going down to 0 and then resetting.

     

    Please see screenshot;

     

    http://imgur.com/pB7uJEW (won't let me post an image)

     

    Any ideas anyone?

     

    Thanks!

     

    EDIT: NEVERMIND! GOT IT! Thank you all for your help, really appreciate it!

    0

Please sign in to leave a comment.