Zum Hauptinhalt gehen

Suche

Suche

Simple Vb Script For Small Cents

Kommentare

5 Kommentare

  • Avatar
    Legacy Poster
  • Avatar
    Legacy Poster

    Hi.

    I used "CurrencyExample 2.btw" and adapted it for my labels. It works but with limitations. The label printing is really slow (I'm talking minutes to print 1/2 dozen label records). I believe it may be because of the several data connections it is making to create the Price. Also the only option is to use superscript and subscript which is not very adaptable.

     

    It would be better to have one VB script that will look at one data source that contains the "price" (example: 2.99) and convert it into $2.99 so that the dollar sign and the cents are formatted say 50% of the size of the Dollar value "2". I am using autosize for the font so that the font is resized smaller to fit larger amounts e.g. $123.99.

     

    Is this possible?

    thanks,

    0
  • Avatar
    Ian Cummings
    Moderator

    Perhaps you could attach you BarTender document, thus far, so I can see what you're doing...

    0
  • Avatar
    Legacy Poster

    I am creating a label that connects to a data source (xlsx file).

     

    I need a vba script written that will look at one data source that contains the "price" (example a field containing 2.5 (Field("Sheet1$.SellPrice1") and covert it into $2.50 so that the dollar sign and the cents are formatted at say 50% (I may want to change this ratio) of the size of the Dollar value "2". I am using autosize for the font so that the font is resized to accommodate a larger price e.g. 123.99.

     

    I have attached a bartender label file but I can't attach the source file as the uploader won't allow me to attach an xlsx or zip file.

     

    thanks

    0
  • Avatar
    Ian Cummings
    Moderator

    How about you take a different approach.  Create two text objects that use the same data source (no VB script), then from the "Transforms" tab of each open the "Truncation" properties and choose to discard two characters from the right for the most significant value, and then keep two characters on the right for the least significant value.  Position, size, and align the two objects as is needed.

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.