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)
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
- Select the option for Enable all macros (FIG 1.5)
- Then make sure that the “Trust access to the VBA object model” is checked.
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