Number_of_periods = Range("B4").Value * Range("B5").ValueĮmi = WorksheetFunction.Pmt(monthly_rate, number_of_periods, -loan_amount) Monthly_rate = Range("B6").Value / Range("B5").Value
Give the button macro name btnCalculateEMI_ClickĮnter the following code Dim monthly_rate As Single, loan_amount As Double, number_of_periods As Single, emi As Double It’s the actual loan amountĬreate the GUI using excel cells as shown belowĪdd a command button between rows 7 and 8 It’s the loan term multiplied by number of payments per year
Now we will demonstrate how to program in VBA programming language. You will now be able to see the DEVELOPER tab in the ribbon VBA Hello World! As you work with VBA Excel, you will be required to declare variables too just like in algebra classes They can also be changed to say 4 and 2 respectively. In this expression, x and y are variables.