Create Code Library
With AutoMacro, you can easily create your own code library inside the VBA Editor.
![](https://www.automateexcel.com/excel/wp-content/uploads/2024/03/custom-code-insert-compressed_en.gif)
To add a new folder, click the Add Folder button:
![](https://www.automateexcel.com/excel/wp-content/uploads/2024/03/custom-code-addfolder2_en.png)
Or, use the “Edit” Menu to create your folder structure (see below for more information).
![](https://www.automateexcel.com/excel/wp-content/uploads/2024/03/custom-code-edit2_en.png)
Add Code to Library
To add code to the library:
![](https://www.automateexcel.com/excel/wp-content/uploads/2024/03/custom-code-save_compressed_en.gif)
- (Optional) Highlight the code.
- Navigate to the desired folder.
- Click Add Code
- Provide a name for the code and if necessary, edit the code.
- Click Save
Save Code from AI Code Generator
You can also add code generated with AI directly to your Code Library.
![](https://www.automateexcel.com/excel/wp-content/uploads/2024/03/ai-code-gen-save_en.png)
Edit Code Library
From the Edit menu you can quickly edit the Code Library.
![](https://www.automateexcel.com/excel/wp-content/uploads/2024/03/FrmCustomCode_en.png)
Click on individual saved code to edit them.
![](https://www.automateexcel.com/excel/wp-content/uploads/2024/03/custom-code-editcode_en.png)
Or right-click on menu items to edit them.
![](https://www.automateexcel.com/excel/wp-content/uploads/2024/03/custom-code-rightclick_en.png)
< Previous
Code Library
Next >
Insert Macros
Start Automating Excel
![automacro](https://www.automateexcel.com/excel/wp-content/uploads/2024/04/automacro-salesCTA_en.png)