0426 question 5 multiple choice average score 1

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: You should 39.362%write the code in a sub procedure in VBA and use locals to trace through it if you don’t understand. 0.426% • Question 5: Multiple Choice Average Score 1 points How many message boxes are displayed after running each sub-procedure below? Option Explicit Sub A() Dim lngA As Long For lngA = 1 To 3 MsgBox "Hello" Exit For Next End Sub Kai Zhao 3/26/12 4:11 PM Comment [5]: “Exit For” terminates the FOR loop, and thus this only opens 1 messagebox Sub B() Dim lngA As Long For lngA = 1 To 3 Step 3 MsgBox "Hello" Next End Sub Sub C() Dim lngA As Long For lngA = 1 To 3 Step 2 MsgBox "Hello" Next End Sub Correct Kai Zhao 3/26/12 4:13 PM Comment [6]: For the first iteration, lngA = 1, then lngA = 3 Percent Answered 1 from Sub A 1 from Sub B 1 from Sub C 1 from Sub A 2 from Sub B 1 from Sub C 2.979% 1 from Sub A 1 from Sub B 2 from Sub C 50% 2 from Sub A 2 from Sub B 2 from Sub C 0.851% 3 from Sub A 1 from Sub B 2 from Sub C 32.128% 3 from Sub A 3 from Sub B 3 from Sub C 12.34% 1.489%...
View Full Document

This document was uploaded on 02/17/2014 for the course CS 105 at University of Illinois, Urbana Champaign.

Ask a homework question - tutors are online