The VBA code is part of the workbook. Whenever the workbook is saved, the code is saved.
The workbook can be saved from the VB Editor by using Ctrl + S, menu command
File | Save, or by using the Save button.
Note: Menu command File | Save As is not available from the VB Editor. If you want to save your
project with a new name, you need to do it from the Excel workbook.