Access JumpStart 2.0 | Blog

A Rapid Development Framework for Microsoft Access

As an Access developer, my typical knee jerk response to Macros is: DON’T USE MACROS, anything a macro can do, VBA can do!

However, there are a couple of things macros can be used for that VBA actually can’t do.

— GASP —  WHAT???

One thing you can’t do with VBA is setup an automated task to begin at startup.  You have 2 options that I am aware of for this task:

1. Create a macro named “Autoexec”.  Access will automatically start this macro if you don’t bypass it by holding down the left shift key while opening the database.
2. Choose a form to automatically open on startup in the Access database options dialog.

Either of these options allow you to launch VBA code, but by themselves the options require a non-VBA object to open first.

Beginners may also find it useful to look at macros and create some to see what kinds of options are available.  Yes, VBA can do them all, but VBA doesn’t really provide you with an interface like the macro builder which provides drop down lists of various available options.

As a beginner, realize that if you have created a bunch of macros, there are options in Access to convert any macro to VBA code, so you are never going to have to reinvent the wheel.  The generated VBA code might need tweaking, but it generally works pretty well out of the gate after conversion.

Check out this article from Microsoft for more info on their take as well as specifically how to convert your macros to VBA code:
Introduction to Access programming – Microsoft Support