Starting a New Procedure in the VBA Editor


One of the handiest features of the VBA Editor is the ability to start a new procedure using a dialog box. Up to this point, you have started procedures by typing the keyword Sub followed by the name of the procedure, as follows:

Sub addNumbers() End Sub 

The VBA Editor adds the End Sub line automatically, as well as the opening and closing parentheses after the procedure name.

There is another way of doing this: by selecting Insert | Procedure. You should see the following dialog box:

Here you can add the name of the procedure, the type of procedure, and the scope of the variables. If you don’t know what that last part is, don’t worry! You will find out in the next chapter.




Access VBA Programming
Microsoft Access VBA Programming for the Absolute Beginner
ISBN: 1598633937
EAN: 2147483647
Year: 2006
Pages: 214
Authors: Michael Vine

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net