AutoMacro AI
![ai button](https://www.automateexcel.com/excel/wp-content/uploads/2024/01/AI-button.png)
Overview
With Automacro’s AI, you can use AI to:
- Chat with the AI to answer your VBA questions.
- Generate VBA code for a specific task.
- Explain what a specific section of VBA code does.
- Add comments to existing code, making it easier to understand.
- Debug code to fix errors.
Getting Started
AutoMacro AI is accessible by clicking the “A” button in AutoMacro:
![ai button](https://www.automateexcel.com/excel/wp-content/uploads/2024/01/AI-button.png)
The AI window can be set to dock inside the VBA Editor:
![dock ai in vba editor](https://www.automateexcel.com/excel/wp-content/uploads/2024/01/ai-dock-in-vbe.png)
or as a separate Window.
![ai floating form](https://www.automateexcel.com/excel/wp-content/uploads/2024/01/ai-form.png)
These and other settings can be adjusted by clicking the settings button.
![ai modify settings](https://www.automateexcel.com/excel/wp-content/uploads/2024/01/ai-settings-button.png)
Right-Click
AutoMacro’s AI features are also accessible from the right-click menu:
![](https://www.automateexcel.com/excel/wp-content/uploads/2024/04/ai-right-click_en.png)
When using the right-click menu, AutoMacro will read your code:
- If you’ve highlighted code or comments it will process only the highlighted portion.
- Otherwise it will process the entire procedure containing your selection.
Generate Code From Comments
AutoMacro’s AI can generate code from comments. Simply add comments describing your desired code. Then either use the right-click menu option, or end your comment with an apostrophe (‘), and click Enter.
Features
Chat
The chat feature allows you to ask the chat bot any questions related to VBA.
![ai vba help bot](https://www.automateexcel.com/excel/wp-content/uploads/2024/01/ai-chat.png)
If the chat bot responds with VBA code, it will appear in a Code Editor Window, allowing you to easily copy the code.
![copy ai chat output](https://www.automateexcel.com/excel/wp-content/uploads/2024/01/ai-chat-copy.png)
Use CTRL + ENTER to add a new line to your request.
Use Up / Down arrows to see your previous questions, allowing you to edit and resubmit for a more refined answer.
Code Generator
![ai vba code generator](https://www.automateexcel.com/excel/wp-content/uploads/2024/01/ai-code-gen.png)
The Code Generator generates VBA code; describe your code and hit “Generate”.
This feature can also be accessed by generating code from comments (see above).
Code Commenter
![comment vba code](https://www.automateexcel.com/excel/wp-content/uploads/2024/01/ai-code-commenter.png)
The Code Commenter adds comments to your VBA code. This is extremely useful to help you understand poorly documented code or simply to improve your own documentation.
Highlight the code you want to copy, or place your cursor within a procedure and click “Comment Highlighted Code” or “Comment Procedure”.
Also, you can access the commenting feature, via the right-click menu.
Code Explainer
The Code Explainer explains VBA code. You can paste code into the Code Editor, you use the right-click menu.
![explain vba code](https://www.automateexcel.com/excel/wp-content/uploads/2024/01/ai-code-explainer.png)
This feature can also be accessed via the right-click menu.
Code Improver
Coming Soon!
Let AI improve (or fix) your VBA code for you!
AutoMacro Download / Getting Started
Tools
Start Automating Excel
![automacro](https://www.automateexcel.com/excel/wp-content/uploads/2024/04/automacro-salesCTA_en.png)