Читать книгу Excel Macros For Dummies онлайн
55 страница из 60
Option Explicit
Changing this setting affects only new modules, not existing modules. If this statement appears in your module, you must explicitly define each variable you use. Using a Dim statement is one way to declare variables.
If you don't set this option, VBA won't require you to explicitly declare your variables. If you don't declare a variable, VBA will declare it for you the first you use it. That is, VBA will create a spot in memory with that variable's name. That may seem like a time saver, but the first time you mistype a variable, you'll be glad you required variable declaration. Bugs from misspelled variables can be hard to find.
The Auto List Members option
If the Auto List Members option is set, VBE provides some help when you’re entering your VBA code. It displays a list that would logically complete the statement you’re typing. This feature is very useful for saving time while coding.
The Auto Quick Info option
If the Auto Quick Info option is selected, VBE displays information about functions and their arguments as you type. This is similar to the way Excel lists the arguments for a function as you start typing a new formula.