How do I convert an integer type variable to a string with a specified number of leading zeros within a basic macro?
e.g 5 => “0005”
How do I convert an integer type variable to a string with a specified number of leading zeros within a basic macro?
e.g 5 => “0005”
Dim iNumber As Integer, sString As String
' Put 10 zeroes if the total length should be = 10
sString = Right("0000000000" & iNumber, 10)