Implicit Variable Declaration

■ If you misspell a variable name in your procedure, Visual Basic may display a run-time error or create a new variable. You are guaranteed to waste some time troubleshooting problems that could have been easily avoided had you declared your variable at the beginning of the procedure.

■ Since Visual Basic does not know what type of data your variable will store, it assigns it a Variant data type. This causes your procedure to run slower because Visual Basic has to check the type of data every time it deals with your variable. Because Variant can store any type of data, Visual Basic has to reserve more memory to store your data.

0 0

Post a comment