Add leading Zeros to number

J

jack

Hello,

I have a number that is 6 places long.

I would like:

"16" to be "000016"
"116" to be "000116"

and so on.

Any help whould be great!!

Thanks,

Jack
 
J

jack

Hello,

Thanks for the quick reply. How do I have the formating done on a var like
CounterCount?

Thanks,

Jack
 
H

Herfried K. Wagner [MVP]

Hello,

jack said:
I have a number that is 6 places long.

I would like:

"16" to be "000016"
"116" to be "000116"

and so on.

Any help whould be great!!

\\\
MsgBox(Format(16, "000000"))
///

HTH,
Herfried K. Wagner
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top