Reputation: 677
I want to take an integer and display it in digits no matter what the value, e.g Int = 1 to be displayed as 001. No the integer will never be more than 3 digits. Its probably simple and im just missing the obvious.
CStr(Format(Int, 000)
I am concatenating the result as a string. Thanks
Upvotes: 3
Views: 15365
Reputation: 4312
This will always show three digits:
MsgBox Format(iMyInt, "000")
Upvotes: 6
Reputation: 2451
I think all you needed was double-quotes:
CStr(Format(Int, "000")
Upvotes: 2