Option Explicit

When this statement is present, you won't be able to run your code if it contains any undeclared variable.

You need to use Option Explicit only once: at the beginning of your module. Keep in mind that the Option Explicit statement applies only to the module in which it resides. If you have more than one VBA module in a project, you need an Option Explicit statement for each module.

Suppose that you use an undeclared variable (that is, a variant) named CurrentRate. At some point in your routine, you insert the following statement:

0 0

Post a comment