• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 29. Introducing VBA Programming > Understanding Sub and Function Proced...

Understanding Sub and Function Procedures

The majority of the VBA code you create will be stored in procedures. A procedure is simply a series of VBA statements that is collected together for execution. There are two types of procedures in VBA:

  • Sub procedures are designed to perform a series of actions. All recorded macros are sub procedures, as are the event procedures that are automatically created for working with custom forms.

  • Function procedures may perform a series of actions, but can also return a resulting value. Function procedures are useful for performing calculations, manipulating text expressions, or for verifying the success or failure of an operation by setting an appropriate result.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint