The menu disappears and the name of Sheet1 is highlighted. VBA is derived from Visual Basic 6 which was the most used programming language in the world until it was phased out when Microsoft introduced. Make sure you are working in a macro-enabled workbook one of the Excel file types.
Sub name. Value ElseIf ActiveCell. The Function Arguments dialog box opens, ready to receive the arguments. But macros are actually quite limited. Excel goes through all of these statements in order.
Here are the lines we use to do that: Range "F2". For the screen dumps we are going to use Excel but the all of the earlier versions of Excel work in much the same way once you get to actually writing a program. Jordan You will get the following message box Congratulations, you just created your first VBA program in excel Step by step example of creating a simple EMI calculator in Excel In this tutorial exercise, we are going to create a simple program that calculates the EMI.
For historical reasons VBA programs are also known as "macros" and you will find that a lot of the menu options and help files refer to macros. Step One You write a VBA program not in a standard worksheet but in a specially inserted workbook page called a module.
How you open the VBA editor depends on the version of Excel you are running. Notice that the worksheets are sorted alphabetically in the Project window even if they are not in the workbook.