VBA (Macros) Code Examples Add-in - Free Download

excel vba examples free download

AutoMacro has been used by employees of these organizations. These organizations do not endorse, approve, sponsor, or otherwise have any affiliation with this website, Spreadsheet Boot Camp LLC, or ToolFive Software LLC.

About the Add-in

Our free VBA add-in installs directly into the VBA Editor (see above).

It contains 150 ready-to-use VBA Macro code examples for Excel. Simply click your desired code example and it will insert directly into your module:

vba add-in code examples


Click the download button to download our free VBA add-in for Excel!

Important! Read the Walkthrough below. It contains important information.


The macro code examples add-in was designed entirely with VBA. This can be convenient because you don't need to install anything, but VBA has limitations. As a result of these limitations, the add-in will stop functioning periodically (note: this happens when VBA "loses focus", often as a result of code errors).

To help, we built in a "reset" button:

vba excel download

To activate the reset, go to Excel and click the AutomateExcel.com Ribbon > Restore VBA Add-in.

If you find the add-in useful, you'll love our premium VBA add-in (more information below). The premium add-in is not built with VBA and doesn't require any resets. It has many more (better organized) code fragments, VBA code generators, the ability to save your own code, and much more....


1. Download the file above

2. Open Excel and go to: File >Options, Trust Center. Trust Center > Macro Settings
Make sure "Trust access to the VBA project object model" is checked.

3. Make sure the Developer Ribbon is visible:

vba developer ribbon add in

4. If the Developer Ribbon is not visible then follow the instructions titled Add Developer Ribbon.

5. Go to Developer (1) > Excel Add-Ins (2) > Browse (3). Then browse for your file. After you select you file, make sure you see a checkmark next to "Automacro_Basic" (4)

vba addin install

6. Your add-in is now installed! To disable the add-in, simply uncheck the box.

VBA Add-in FAQs

How to download VBA For Excel?

All versions of Excel already come with VBA installed. Use shortcut ALT + F11 to open the VBA Editor.

How to install Excel Add-ins?

Make sure the Developer Ribbon is installed. Then go to Developer > Excel Add-ins > Browse to select and install your add-in.

What is the VBA Code Examples Add-in?

The VBA Code examples add-in is a free add-in for Excel / VBA that comes with 150+ ready-to-use VBA code examples & macros.

AutoMacro - The Ultimate VBA Add-in

AutoMacro is an add-in that installs directly into the Visual Basic Editor:

excel vba add ins download

The add-in comes loaded with code generators, hundreds of macro code examples, the ability to create your own code library, and other time-saving tools.

Join the Hundreds of Professionals Who Use AutoMacro

"I use it almost every day. A great tool for getting things done, but also a great tool for learning how to do things! This is one purchase this year I have no regrets about."

Galen - USA

AutoMacro Features

Code Generators

Code Generators build code from scratch via visual interfaces!

vba code builder
vba code library builder

Code Library

300 Ready-to-use code examples & VBA macros.


Save your own frequently used code and share with team members.

Coding Tools

VBA Coding tools to improve the out of date Visual Basic Editor.

Speed up your workflow with tools to navigate, debug, format and more.

vba code tools
vba interactive tutorial

VBA Tutorial

Our premium VBA add-in contains a free VBA tutorial.

Just download AutoMacro and you'll have access to the tutorial.

Why Wait? Order Now


Simple version for beginners

1 Single-use License Code

Interactive VBA Tutorial
100 ready-to-use code examples
Procedure, Loops, & Copy Paste Builders
All other code generators
Coding tools
Create your own code library
Transfer Activations to other PCs
Access to new features & updates


Upgrade Anytime!


Tools for serious developers & more

3 Transferable License Codes + Updates

Interactive VBA Tutorial
230+ ready-to-use code examples
Procedure, Loops, & Copy Paste Builders
All other code generators
Coding tools
Create your own code library
Transfer activations to other PCs
Access to new features & updates

$169 +

$20 Annual Subscription (starts a year from now)

Upgrade Anytime!

Customer Reviews

Other Information


What is your refund policy?

We have a 30-day, no-questions-asked, 100% money-back guarantee. If you’re unsatisfied for any reason, let us know and we will refund your order!

Can I try AutoMacro before I buy?

Yes! You can download AutoMacro here: https://www.automateexcel.com/automacro/download-walkthrough2. 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: support@toolfivesoftware.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 use on more than one computer?

The Beginner version entitles you to a single-use license code valid for 1 computer. The Developer version is valid for 3 computers for which you are the primary user. With the Developer+ version you can transfer activations between computers, allowing AutoMacro to be installed on any 3 computers at one time.

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.

Code Library

VBA Code Library: Easy access to 230+ ready-to-use code fragments and the ability to create your own code library.

Save Your Own Code

Create your own code library. Organize into folders. Share with colleagues.
Learn More


Toggle the most-used Excel / VBA settings.
Learn More

Keyboard Shortcuts

All code accessible via keyboard shortcuts. Simply look at underlined letters.
Learn More


Code for working with files and folders.
Learn More


Toggle the most-used Excel / VBA settings.
Learn More

Much More!

Ifs, Case Selects, Loops, Fors, MessageBoxes, Text, Dates, Times, and ready-to-use functions.
Learn More

Code Tools

AutoMacro's Coding Tools and Utilities make coding in VBA easier.
Use the tools to navigate, edit, format, and debug your code.

Formatting Tools

  • Comment / Uncomment multiple lines
  • Code indenter
  • Remove excess blank lines

Learn More

Navigation Tools

  • Back / Forward Buttons
  • Create bookmarks and goto with shortcut keys
  • Close all windows

Learn More

Debug Excel Model

  • Review all ranges used in VBA. Identify problems.
  • List all procedures, code, and where used.
  • Scan for formula errors
  • & more

Learn More

Misc. Utilities

  • Sort code
  • Show line numbers
  • Mass import / export of code modules
  • Copy & Paste UserForm controls & their code

Learn More

Code Generator

VBA code generators build code from scratch with visual interfaces.
Minimal coding knowledge required.

Loop Builder

Build code to loop through objects, performing actions when certain criteria are met.
Learn More

Array Builder

Create arrays, collections, and dictionaries from scratch and quickly manipulate them..
Learn More

MessageBox Builder 

Create professional looking MessageBoxes and Inputboxes with an easy to use visual interface.
Learn More

Procedure Builder

Create VBA procedures with your desired settings. Great for Beginners who don't know what settings can be used in procedures!
Learn More

File Builder

Generate procedures to loop through files in a folder, performing actions on files that meet certain criteria. Great for merging together multiple files.
Learn More

Format Builder

Quickly create a preview number formats in VBA.
Learn More

Join the Hundreds of Professionals Who Use AutoMacro

"Great product, haven’t stopped using it since I purchased it. It doesn’t just write your code, it teaches as you go!"

Tony D - United Kingdom

Steve Rynearson:
Creator of AutoMacro

Over the years, I've spent countless hours searching online for example code and adapting that code to my needs.

I often found myself clicking the same links and copying the same code. I thought there has to be a better way!

AutoMacro is the ultimate VBA Code Helper! It eliminates much of the need to search online for code. Instead simply use the menus to select pre-built code or use the builders to generate code for your exact needs.

Additionally, the coding tools will save you time and help you develop more professional looking code.

For anyone coding VBA, AutoMacro is a life-saver. You'll code much faster, develop more professional code, and learn VBA much faster (if you're not already an expert).

Automate Excel
Left Menu Icon