What is a Macro

What is a Macro?

Macro is just the name given to the codes written in VBA. So our codes, henceforth, will be referred to as Macro.

Your projects and Macros (codes) are going to be developed and written in the VBE we discussed earlier. So to open the VBA Editor, follow these steps;

  • Click the Developer tab that we just added to the Ribbon.
  • Click on Visual Basic on the Code Panel. (Figure 1.3)

What is a Macro

Fig 1.3: Opening the VBA Editor Window

Then the Editor window will open and you should have something like fig 1.7

Now we are good to go! We can start writing our macros (codes).

Activating Macro

But one more thing, for you to run your Macros (Codes) successfully, you need to ‘activate all macros’. To do this,

  • Click on Macro Security, on the Code panel
  • Select the option for Enable all macros

What is a Macro

Fig 1.5 showing Macro Security on the Code panel

Then make sure that the “Trust access to the VBA object model” is checked.

What is a Macro

Fig 1.6: Enabling all macros

However, if you’re worried about macro security then you can always bring this box up again and disable the macros before you exit Excel.

You will need to familiarize yourself with the VBE Window and Project Explorer. Tutorial on this will be given in later chapters

Next Section: Writing your First Macro

Was this article helpful?

Related Articles

Leave a Reply