VBA Converting other types to strings Use Format to convert and format a numeric type as a string


Example

Const zipCode As long = 10012
Dim zeroPaddedNumber As String
zeroPaddedZipCode = Format(zipCode, "00000000")
'zeroPaddedNumber = "00010012"