VBA code is stored in the SQL VBACODE table of the database, and is unique to each database; i.e. Code written in the sample database will not be available when running the live database and vice versa.

To access the VBA code from the front end, go to Tools > Visual Basic for Applications. The custom code will normally reside under the System or User modules.

Therefore it is automatically included with any regular database backup.