Computing.Net > Forums > Programming > Converting numbers in vbs

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Converting numbers in vbs

Reply to Message Icon

Name: philipl
Date: April 22, 2004 at 09:37:22 Pacific
OS: win2000
CPU/Ram: 256
Comment:

Is there a way to convert for example an integer 5000 to 5,000 in vbs?

Thank you



Sponsored Link
Ads by Google

Response Number 1
Name: StuartS
Date: April 22, 2004 at 15:19:12 Pacific
Reply:

I take it you mean format a number. converting means changing it from an integer into something else like a floating point number.

To Format a number with a coma separating the thousands use:

a = 5000

Format(a, "#,#")

This returns as string, not a numerical value.

Stuart


0
Reply to Message Icon

Related Posts

See More


Loading Windows Libraries... Help me with StreamTokeni...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Converting numbers in vbs

Numbers in VB www.computing.net/answers/programming/numbers-in-vb/4748.html

Multiplication in VB www.computing.net/answers/programming/multiplication-in-vb/5565.html

winsock error 10054 in VB www.computing.net/answers/programming/winsock-error-10054-in-vb/4027.html