Question: A VBA program is shown below. Find the two VBA errors in the program below that will prevent the program from being compiled a) Circle


A VBA program is shown below. Find the two VBA errors in the program below that will prevent the program from being compiled a) Circle the two errors and write a brief explanation how to correct them. b) Assume that the errors you found in a) were eliminated or, if you did not find the errors, assume that the program will run. Show the algorithm that is implemented in this program, using the symbols (rectangle, oval, parallelogram, diamond) as introduced in class. Write in one sentence in the box below what this program is designed to do as far as the numerical method that is implemented: (Please write neatly) Option Explicit Sub Mainprogram () Dim n As Integer, i As Integer Dim b As Double, h As Double Dim x (100) As Double, f (100) As Double n=2 h=(b-a) / n x(0) a f (0) fx (a) x (i) x(i - 1) h Next k MsgBox "The result is"&functionone (h, n, f) End Sub Function functionone (h, n, f) Dim i As Integer For _0To n-1 functionne functionne + h * f(i) + 0.5 * (f ( + 1) -f(i)) * h Next 1 End Function Function fx(x) End Function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
