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

Working with Macros

The basic unit of VBA programming is the macro, which is a block of code in a module that you reference as a unit. So far you’ve seen that there are two types of macros: command macros (also known as Subprocedures) and function macros (or Function procedures).

The Structure of Macro

To recap what you learned earlier, a command macro is allowed to modify its environment, but it can’t return a value. Here is the basic structure of a command macro:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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