If Int(txtCardCode) > 9999 Then
txtBarCode = Format(Int(sDWID), "000") & Chr(64 + Left(Format(Int(txtCardCode), "000000"), 2)) & Right(Format(Int(txtCardCode), "00000"), 4)
Else
txtBarCode = Format(Int(sDWID), "000") & "0" & Right(Format(Int(txtCardCode), "00000"), 4)
End If如果txtCardCode) > 9999 :第4位用字母表示 例如:001 02 0801=001 B 0801
如果txtCardCode) <= 9999 :第4位用0表示 例如:001 00 0801=001 0 0801
txtBarCode = Format(Int(sDWID), "000") & Chr(64 + Left(Format(Int(txtCardCode), "000000"), 2)) & Right(Format(Int(txtCardCode), "00000"), 4)
Else
txtBarCode = Format(Int(sDWID), "000") & "0" & Right(Format(Int(txtCardCode), "00000"), 4)
End If如果txtCardCode) > 9999 :第4位用字母表示 例如:001 02 0801=001 B 0801
如果txtCardCode) <= 9999 :第4位用0表示 例如:001 00 0801=001 0 0801
txtBarCode = Strings.Format(Conversion.Int(sDWID), "000") + Strings.Chr(64 + Strings.Left(Strings.Format(Conversion.Int(txtCardCode), "000000"), 2)) + Strings.Right(Strings.Format(Conversion.Int(txtCardCode), "00000"), 4);
}
else {
txtBarCode = Strings.Format(Conversion.Int(sDWID), "000") + "0" + Strings.Right(Strings.Format(Conversion.Int(txtCardCode), "00000"), 4);
}