To promote scalability and portability of custom code within the VBA/VB world, Access macros should be replaced by code modules whenever possible. Macros can be replaced by code modules except in the following cases:
An AutoExec macro can be used when the database is first opened. Much of the use of such a macro as been replaced by the Tools > Startup... command.
An AutoKeys macro can create custom key combinations.
When Access is used as a DDE server, macros are neeeded.
When a user-defined procedure is called from a toolbar, a macro must be called.
A RunCode macro can be used to call VBA routines. The macro allows storing a user-defined procedure in a variable.