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


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


Click the Insert menu, and then click Procedure.


Enter the procedure's name.


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.


Show Me Microsoft Office Access 2003
Show Me Microsoft Office Access 2003
ISBN: 0789730049
EAN: 2147483647
Year: 2002
Pages: 318 © 2008-2017.
If you may any questions please contact us: