Visual Basic for Applications (VBA) can be used to automate tasks in Access by writing custom code. VBA uses statements, procedures, modules, variables and other terminology. The Visual Basic editor allows viewing and editing VBA code stored in an Access database. Simple VBA code examples include subroutines that display messages. Standard modules contain globally accessible code while class modules contain code attached to specific forms or reports. Events like button clicks can trigger VBA code routines.