VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

How to round a byte amount into KB or MB (also KB/s) with two decimal places

Luis Cantero  (14 Submissions)   Math/Dates   Visual Basic 5.0   Beginner   Wed 3rd February 2021

Apart from what it says on the title, I will also demostrate how to calculate, based on a byte amount and a time period, the amount of KB/s (Kilobytes per second) of a transfer. The decimal separator (. or ,) is shown according to the regional settings.

Assumes
REMEMBER: It is good programming practice to declare your variables AND to make functions out of routines so that you can reuse or modify them easily in the future, this can also be applied to a group of functions and subs that should do something together, just put them in a module or class. Also, do not forget to always comment your code!

Rate How to round a byte amount into KB or MB (also KB/s) with two decimal places (3(3 Vote))
How to round a byte amount into KB or MB (also KB/s) with two decimal places.bas

How to round a byte amount into KB or MB (also KB/s) with two decimal places Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters