Using Option Explicit and defining variables, FOREXtoUSD VBA code is more reliable

In the event of typo errors, we get an ordinary message from excel. Suppose instead of CHF, CHR has been entered. #VALUE error message is not meaningful enough.

For a better message, a modified version of FOREXtoUSD can be used with an error message. In the modified code, error will result in a message such as Rate NA.

Another issue is the time Currency to Convert is USD, so the output needs to be the same as the input. This is an exception state, fixed by an IF statement in the modified FOREXtoUSD code capable of converting USD to USD