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)
FIG 1.3 – Opening the VBA Editor window

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

Activating a Macro in Excel

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 (FIG 1.4, on the Code panel
FIG 1.4 – Macro Security
  • Select the option for Enable all macros (FIG 1.5)
  • Then make sure that the “Trust access to the VBA object model” is checked.
FIG 1.5

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

Let’s begin writing our first Macro.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top
Send this to a friend