Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to delete leading zero's from variable 1

Status
Not open for further replies.

Kocky

Programmer
Oct 23, 2002
357
0
0
NL
Hello there,

I would like to remove leading zero's from a string.
For example:

String1 = "000010"

Result should be "10"

Is there a function in VBScript for this ?

Greetings,

Pascal.
 
Already solved it.

I used the function:

string1 = FormatNumber(string1, 0, vbFALSE)

 
How do i format the number to exclude commas?

 
Try:

string1 = Replace(FormatNumber(string1, 0, vbFALSE), ",", "")

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top