I ask you:
Always, and Never!
The first thing we need to ask is:
And that is a loaded questions, as it depends! It depends on the application we are talking about!
For Office, Excluding Access!
For every other application, besides Microsoft Access, so:
- Excel
- Outlook
- PowerPoint
- Word
- …
a Macro basically equates to a VBA Public Sub. So in looser terms, a VBA procedure.
For Access
Microsoft Access had to be the black sheep of the family and do things differently. Microsoft could have used any term they wanted, but decided to call Macro something different than was the case in the rest of the Office suite.
In Microsoft Access, Macros are a ‘simplified’ coding form in which you pick from a list of available ‘Actions’ fill-in arguments and that’s it. The idea being that you didn’t need to know VBA coding to perform automation and that some can run even when the content wasn’t enabled.
The issue here is that they are hard to work with, harder to troubleshoot, harder to update global elements, many Macro Actions are crippled versions of the same VBA commands, … and just generally frustrating to work with IMHO.
That said, Access also has all the same VBA capabilities as any other application. It’s just that we don’t refer to VBA as Macros, because Macros are separate entities onto themselves.
So Access has what other applications call Macros, and then has their own Macros too. (I know, my head hurts too)
The Confusion!
Hence, a Macro is not always a Macro.
As you can imagine, the fact that VBA code is referred to as Macros in Excel, Outlook, PowerPoint, Outlook, …, but not Access can cause confusion and issues at times. Thus, it is important to understand this nuance to ensure we are all talking about the same thing.
So ask yourself, are you talking about a Macro, or a Macro?! 🙂
Once upon a time Access wasn’t quite so alone with the macro confusion. What a misfortune that the good old Excel 4.0 macros are becoming more and more unknown. 😉 Only since 2021 they are disabled by default (but still working). https://techcommunity.microsoft.com/t5/excel-blog/excel-4-0-xlm-macros-now-restricted-by-default-for-customer/ba-p/3057905
Ah, and BTW
> many Macro Actions are crippled versions of the same VBA commands
With the complete Docmd object it’s the other way round. Access VBA borrowing macro actions.
(see e.g. https://learn.microsoft.com/en-us/office/vba/access/concepts/error-codes/macro-actions-and-methods-of-the-docmd-object)
So, be a little more grateful to the great macros, otherwise we couldn’t even open a form or report by VBA properly! 🙂
I guess it’s a 2 way street, as there are action that are most certainly crippled version of the VBA coding versions.
Thank you for this explanation. Helps to explain the annoying message “Enable macros”. Which to me mostly means “Enable code to run”.