AutoMacro: VBA Code Generator
Are you tired of searching online for simple VBA code?
Are you trying to learn VBA, but you don't know where to start?
Are you an experienced VBA programmer looking for time-saving features?
AutoMacro makes VBA Coding easy(er) for everyone!
What is AutoMacro?
AutoMacro is an add-in that installs directly into the Visual Basic Editor:
It comes loaded with code generators, an extensive code library, the ability to create your own code library, and other time-saving features.
VBA Code Builders to Generate Code to Meet Your Specific Needs
AutoMacro contains four Code Builder "wizards" that allow you to generate complex code to meet your specific needs:
Loops Builder - Loop through cells, worksheets, numbers, arrays, or objects. Select items that meet specific criteria and perform action(s) on those items. Ex. Loop through all cells in a column, test if each cell's value is less than zero, if so add a note to the cell to the right.
File Processing Wizard - Loop through all files in a directory and do something with them: open, delete, merge, etc.. Create specific file criteria to determine which files to open (ex. file name starts with "Auto") Ex: Open all files that include date "20180405", copy+paste the values in, and close the files without saving.
MessageBox Builder - Easily create message boxes that contain specific buttons and icons. Ex: Create a YesNo messagebox and perform different actions based on which button is clicked.
Procedure Builder - Create procedures (subs or functions) with specific settings. Beginners won't need to waste time remembering how to create procedures, and advanced users can save time. Ex: Create a sub procedure with screenupdating disabled, and display a messagebox when the sub is complete.
Format Builder - Select and Preview different number formats before developing code. No more guess work! Ex: Display a decimal value as a percentage .07 = 7%
Easily Insert Code From AutoMacro's Code Library
AutoMacro's code library contains over 200 commonly used code fragments. You will find ready-to-use code to find the last used column, create a yes/no messagebox, open a workbook to a variable, loop through all files in a directory, and much more!
Access the code fragments easily by clicking the menus (see above) with the mouse, or via keyboard shortcuts.
Build Your Own Code Library by Saving Commonly Used Code
Save your own commonly used code fragments to use or to share with your colleagues.
Simply highlight the code, click "Add Code", and your code will be saved for future use.
Custom Code fragments are saved to a folder accessible on your hard drive. You can add folders to organize your code, or change the folder location.
You can even set the Custom Code folder location to a shared network drive, allowing your team to easily share code.
Time-Saving Features & Shortcuts
AutoMacro was designed to help you work faster. With that in mind, almost all features are accessible via keyboard shortcuts. In addition to that, there are several other time-saving features:
VBA Code Indenter - Automatically apply "best-practice" indentation to your VBA code. If you inherit a workbook with poorly indented code, run the code indenter to make the code readable.
Comment/Uncomment Lines of Code - Easily comment/uncomment multiple lines of code at once. Note: our commenter is smart enough to handle multiple lines of code with different comment status.
Remove Excess Line Breaks - This feature removes any excess line breaks (beyond 2 consecutive). Use this in conjunction with the VBA Code Indenter to make your code consistent and easy to read.
Bookmark Navigation - Easily "Bookmark" your code with keyboard shortcuts, and navigate to the next/previous bookmark with additional shortcuts!
File Processing Wizard
The File Wizard allows you to generate ready-to-use procedures to:
- Loop through all the files in a folder (or folders)
- Select files that meet certain criteria
- All Files
- All Excel Files
- All Excel + CSV Files
- File name matches (starts with, ends with, contains, etc.)
- Perform an action on those files:
The File Wizard makes it incredibly easy to process large numbers of files at once. Simply enter the criteria into the File Wizard and run the generated code!
The MessageBox Builder allows you to easily create professional looking MessageBox and InputBox prompts.
Simply enter the title and text. Then select your desired icon, buttons, and default button.
You will see a preview of the messagebox and the corresponding code.
Once it looks good, insert the code, and enter the actions to perform based on the user's selection within the Select Case code.
The InputBox tab works the same way, except you will be able to define a default value, and an input type.
The Procedure Builder allows you to create procedures with specific application settings, error handling, and more.
Beginners will find this useful to understand what options are available when creating procedures. Advanced users may find it to be a big time saver.
The Procedure Builder also encourages coding "best practices", prompting you to disable ScreenUpdating, Automatic Calculations, handle errors, display a MessageBox after completion, and more.
File Processing Wizard
The Format Builder makes it easy to format numbers in VBA.
Simply enter your value then choose between a default format, commonly used custom format, or enter your own custom format.
You will see a preview of the formatted value and once you verify the format is correct, you can insert the code.
No more trial and error while you try to find the correct format!
Easily Insert Commonly Used Code Fragments
Stop searching for VBA code examples online! Instead, simply use the AutoMacro add-in to easily insert commonly used code fragments into your module.
It's easy! Simply navigate to the menu, select the code fragment, click, and the code is added where your cursor is located:
- The settings menu contains VBA and Excel settings including:
- Automatic Calculations
- Error Handling
- and much more
- Pro-Tip: Even if you know the syntax, make use of the keyboard hotkeys and save some keystrokes
Ifs, Selects, Fors, Loops, and Message Boxes
- Fors and Loops are essential to automating repetitive processes. However when you first start coding, the exact syntax can be hard to remember.
- AutoMacro allows you to easily insert 5 of the most common types of loops, allowing you to adapt them to your needs.
- Insert examples of Ifs and Case Selects - If you aren't familiar with these essential VBA commands, insert an example and adapt the code to your needs.
- Message Boxes and Input Boxes allow you to easily communication information to the user, or receive information from the user. Easily insert them with AutoMacro.
- Functions to work with files: Does a file exist?, Get file name from path, and unzip files.
- The Files menu contains code to manipulate files
- The Folders menu contains code to work with folders
- SpecialFolders provides code to access MyDocuments and other special folders
- The TextFiles menu contains code to work with text files allowing you to load them into VBA's memory, edit them, and more.
- Does a specific Sheet & Range exist? TRUE / FALSE
- Does a file exist? TRUE / FALSE
- Standard start & end procedure declarations
Text, Dates, and Times
- VBA comes with many tools for working with text, dates, and times.
- AutoMacro provides examples for you to reference
Most Excel VBA work is manipulating objects like Ranges, Sheets, and Workbooks. You manipulate these objects by either applying a method (an action like Copy or Paste) or a property (cell value or cell color).
With a click of the mouse in AutoMacro you can apply a method or property to an object.
Columns and Rows
The Object Builder (and all other code), can be programmed to use Object Variables or the currently active objects
Save Your Own Frequently Used Code:
Do you find yourself using similar code over and over again across multiple workbooks? If so, you can save your own code to the custom code folder and easily access it whenever you want! It's easy:
1. Highlight the Desired Code
3. Name your code fragment and click 'Save'
2. Navigate to 'Custom Code' and click 'Add Code'
4. Click your code fragment and insert it into your module. Or... Better yet, use the "Alt Accelerator" keyboard shortcut to insert saved code with just a few keystrokes.
Other Time-Saving Features and Shortcuts:
Comment or Uncomment Multiple Lines of Code at Once
CTRL + ALT+ C
Easily Comment or Uncomment out multiple lines of code at once.
AutoMacro is smart enough to understand when only part of a highlighted section is commented
Use the keyboard shortcut CTRL + ALT + C, the icon in the command bar, or the right-click menu.
Create Bookmarks with the shortcut CTRL + ~.
- Bookmarks allow you to "bookmark" a location and easily return to it later.
CTRL + ~
Use CTRL + 1 (CTRL + 2) to navigate to the next (previous) bookmark.
CTRL + 1
Clean up messy code and make it more readable with proper indentation.
Remove Excess LineBreaks
Quickly remove all excess (more than 2 consecutive) linebreaks in your module:
All Code is Accessible with Shortcuts
Every code fragment (including your own Custom Code Fragments!) and tool is easily accessible with 'ALT' keyboard shortcuts
Simply press 'Alt' and then type the underlined letter in your desired code fragment.
Example: ALT > B > C > L will insert the code fragment 'Last Column'
Can I try AutoMacro before I buy? Yes! You can download AutoMacro here: https://www.automateexcel.com/automacro/download-walkthrough . Most of the features are disabled until you enter a License Code, but you can verify that it works properly on your computer. If for some reason it doesn't install properly, let us know: email@example.com .
Can I install AutoMacro on my work computer? Yes! AutoMacro works in many corporate environments. It was designed to be as unobtrusive as possible and should install without the need for "admin privileges".
Will AutoMacro work on my system? AutoMacro was designed to work on all Microsoft Windows systems (7,8,10, etc. and 32-bit or 64-bit). It will also work on all versions of Microsoft Office (2007, 2010, 2013, 2016), including 64-bit Microsoft Office. Try the download link above to make sure!
Will my company pay for AutoMacro? Your company may have an allowance that will reimburse you for productivity tools like AutoMacro. This is the case for some of our users. Ask your boss, HR, or IT!
Can I deduct this purchase on my taxes? See this page from the IRS on Employee Business Expenses.
Can I use on more than one computer? The Beginner version entitles you to a single-use license code valid for 1 computer. The Standard version entitles you to a single-use license code valid for 2 computers for which you are the primary user. The Professional version is valid for 3 computers.
Does AutoMacro work with PowerPoint, Word, or Access? Yes! AutoMacro functions in any program with the Visual Basic Editor. The code fragments are (currently) intended for Excel, but all features will work in any Visual Basic Editor environment.
What are the exact differences between the tiers?
Life-time license valid for 1 computer*
Life-time license valid for 2 computers*
Life-time license valid for 3 computers*
Other questions? Contact firstname.lastname@example.org
What are you waiting for?
When I first learned VBA, I searched online countless times for the same basic code:
- How to disable screen updating
- How to disable automatic calculations
- Copy and Paste a cell in VBA
I would click the same links, and copy the same code over and over again. In fact, even as an experienced VBA user, I find myself often searching online for code examples. Why reinvent the wheel?
AutoMacro eliminates much of this need to search online for code. Instead simply navigate to its menus or builders and insert your desired code. This saves you time, and the lost productivity from shifting gears: opening a browser, typing in the search, finding the right page, copy + pasting the code. Instead simply use a few keystrokes to insert code from AutoMacro's code library!
For a beginner VBA user, AutoMacro is a life-saver. You'll code much faster, learn VBA much faster, and decrease the likelihood of giving up on learning this powerful coding language.