Visual basic editor (VBA) visual basic for applications


Why visual basic editor?

Excel provides with a wide range of functions which perform pre defined work. however sometimes it may be necesary to perform some tasks that are beyond the inbuilt function. Thus excel gives an easy way of coming up with user defined functions.

These user defined functions can perform tasks that are custom to the spefic tasks that the user requires to be perfomed. It is worth noting that user defined functions requires some bit programming skills which come be learnt form our tutorials under Visual basic tutorials category.

Visual basic is very easy to learn. For excel we need visual basic editor to begin with. The illustration below will give an insight on visual basic editor.


User defined functions can only work on a micro enabled worksheet so we begin by saving our work book as macro enabled.

Click save as, then select location, select the type of file as macro enabled workbook

macro enabled 1

then click save

adding visual basic editor icon

Sometimes the icon for the visual basic might not be visible on the main menu hence the icon should be placed using the procedure.

To access the visual basic editor icon you have to edit the menu and add the icon using the procedure below.

Right click any where on the main menu and select

macro enabled 2

from the dialog box that appears, choose all commands, then locate the visual basic editor, then click add, then okay

macro enabled 3

the icon is now added as shown below

macro enabled 4

now we are ready to go.

Click on the editor to bring in the editor menu

macro enabled 5

A new module is inserted for us for coding

macro enabled 6