How do I insert commas to numbers so I can convert 1000 to 1,000 or 1000000 to 1,000,000.

FileSize = GetSize(MyFile).ToString & " KB"

the output would be "6652 KB"

i m trying to get output 6,652 KB

Plz try to modify this code only.

Recommended Answers

All 2 Replies

FileSize = CInt(GetSize(MyFile)).ToString("#,###,###,###") & " KB"
FileSize = CInt(GetSize(MyFile)).ToString("#,###,###,###") & " KB"

Thank U. It Works...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.