You can not become a scientist if you require that every question has an answer because its the very questions that have no answer that attract you to a laboratory every single day.
One of our Lt. Commanders, John Davy, brought to my attention a rounding error in the CurrencyToEnglish function. If you enter a check for $4,999,999.99 then it prints on the check as "Five Million Dollars." Turns out that there's a problem using integer division. If you type in:
X = 4999.99 \ 4000
You would expect to get 4. Nope. You get a 5. I forgot to take into account that integer division uses the rules that the Round function uses for Banker's Rounding. See that link for complete reasons why.
Fortunately, it's an easy fix. Instead of using integer division we'll just divide and use the INT function to chop off the decimal place. So you only have to change three lines of code:
' Billions B = Int(C / 1000000000)
' Millions M = Int(C / 1000000)
' Thousands T = Int(C / 1000)
That's it. I've already updated the Code Vault and replaced the code in the database in the course ZIP file. So if you're using that, I strongly recommend you update it. It will only happen rarely, but like John said, "a penny isn't much, but the accountant wouldn't like it."
The videos really aren't affected because I don't explain HOW the code was written in class. I just give a basic overview of how to use it. But this is why you should always check the notes and addendums. :)
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.