Numbers with leading zeroes, using vb6

后端 未结 3 781
野性不改
野性不改 2020-12-19 07:52

How can I add leading zeroes to a number? For example:

Dim stracctnumber as String
stracctnumber = 987654321

If stracctnumber

3条回答
  •  粉色の甜心
    2020-12-19 08:45

    strAcct = Right("000000000000000" & strAcct, 15)
    

    Note that concatenation is relatively 'expensive'. If this is just for display, rather than modifying the underlying value, consider using the Format() function.

提交回复
热议问题