Question: In VBA Sub Simplemath () Dim a As Single Dim b As Single Dim c As Single Dim d As Single Dim j As Integer
In VBA


Sub Simplemath () Dim a As Single Dim b As Single Dim c As Single Dim d As Single Dim j As Integer 4 a = Cells (1, 1) .Value - 4 If b 3 And b 5 Then c = Cells (2, 2) .Value + b Cells (2, 3).Value Ct 2 Cells (3, 2) Value = a End If For j = 3 To 7 Step 1 Cells (j - 1, 4) .Value = d Next J End Sub Answer the following questions based on the given program 1. What is the initial value of the variable b? How many times does the For-loop run? 3. What is the value in the cell (2,3)? 4. What is the value in the cell (4,4)? 5. What is the sum of values in the cell (5,4) and (6,4)? 2. 6. What is the value in the cell (3,2)? 7. What is the value in the cell (4,1)? Sub Simplemath () Dim a As Single Dim b As Single Dim c As Single Dim d As Single Dim j As Integer 4 a = Cells (1, 1) .Value - 4 If b 3 And b 5 Then c = Cells (2, 2) .Value + b Cells (2, 3).Value Ct 2 Cells (3, 2) Value = a End If For j = 3 To 7 Step 1 Cells (j - 1, 4) .Value = d Next J End Sub Answer the following questions based on the given program 1. What is the initial value of the variable b? How many times does the For-loop run? 3. What is the value in the cell (2,3)? 4. What is the value in the cell (4,4)? 5. What is the sum of values in the cell (5,4) and (6,4)? 2. 6. What is the value in the cell (3,2)? 7. What is the value in the cell (4,1)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
