I'm trying to format the weight i get from my scale correctly for GS1-128. I made it already that the result is a weight like "1,234". But GS1-128 requires 6 digit weight without comma or point. So in this case it should be: 001234.
I managed output of the variable if the weight has 3 digits. but if i set the weight manually to 1 it does not work because it does not add ,000.
i used this script:
Code: Select all
var1=[Gewicht für EAN] var1=Replace(var1,".","") var1=Replace(var1,",","") Do While (Len(var1) < 6) var1 = "0" + var1 Loop Result = var1