Creating a Sub Procedure

You can either type a Sub procedure directly into the Modules window, or the Visual Basic Editor can insert it for you. Sub procedures all begin with the line: Sub ProcedureName( ) where ProcedureName is the name of the Sub procedure. If the Sub procedure includes arguments, enter them between the opening and closing parentheses. Not every Sub procedure requires arguments. After entering the first line, which names the procedure, you can insert the procedure's VBA commands. Each Sub procedure ends with the line: End Sub

Create a Sub Procedure

graphics/1_icon.jpg

In the Visual Basic Editor, click the Module window to select it.

graphics/2_icon.jpg

Click the Insert menu, and then click Procedure.

graphics/3_icon.jpg

Enter the procedure's name.

graphics/4_icon.jpg

Click the Sub option, if necessary.

graphics/5_icon.jpg Click OK.

The Editor inserts the opening and closing lines of the new Sub procedure.

graphics/14inf03.jpg



Show Me Microsoft Office Access 2003
Show Me Microsoft Office Access 2003
ISBN: 0789730049
EAN: 2147483647
Year: 2002
Pages: 318

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