Review Part 2 Excel Elements

advertisement
Review Part 2: Elements of Excel
In this part we looked at the basics of Excel. Be sure to practice naming cells using the “B3” format and
translating to the “Cells(3,2)” format, and to be able to distinguish relative versus absolute addressing.
Typical questions for this part:
Answer True (T) or False (F)
1. It is safe to open Excel spreadsheets from an unknown source that may contain macros.
2. The container for VBA code can be a workbook.
3. The container for VBA code can be a userform.
4. VBA code can change the files on your computer.
5. Recording a Macro in Relative mode means it will always operate on the same cells every time.
6. Naming a cell can make your formulas and macros easier to understand.
7. Macros can be activated with command buttons placed on a spreadsheet.
8. Macros cannot be invoked by clicking on a picture.
9. Clicking a button on a spreadsheet is the only way to invoke a macro.
10. What cell reference corresponds to cell B4 in an Excel spreadsheet?
A. Cells(1,1)
B. Cells (2,4)
C. Cells(4,4)
D. Cells(4,2)
E. None of the above
11. Which tab contains the commands for recording VBA macros and setting macro security levels?
A. Insert
B. Developer
C. View
D. None of the above
12. What cell does the cell reference Cells(5,3) correspond to?
A. B3
B. C5
C. E3
D. F5
E. None of the above
13. What is the symbol to make a cell row or column reference absolute?
A. &
B. #
C. @
D. $
14. Suppose I put this formula in cell C1 and then copy it down and then over to all cells between C1 and
D5:
=SUM($A$1:$A$10)
What formula will cell D5 contain?
A. =SUM($B$5:$B$15)
B. =SUM(B$5:B$15)
C. =SUM($B5:$B15)
D. =SUM($A$1:$A$10)
15. Suppose I put this formula in cell E1 and then copy it down to cell E2:
=SUM(A1:A5)
What formula will cell E2 contain?
A. =SUM($A$1:$A$5)
B. =SUM(A1:A5)
C. =SUM(A2:A6)
D. =SUM(B1:B6)
Note: open a spreadsheet and try several examples like question 43 until you can accurately predict the
results.
16. The background color of a button on a userform can be changed by
A. Changing it in the Properties window
B. Having the userform code change it
C. Both A and B
D. Neither A nor B
For the following questions, answer True or False.
17. Changing the Name property of a button changes what you see on the screen when you run the
program.
18. Changing the Caption property of a button changes what you see on the screen when you run the
program.
In each of the following problems, a text box called txtBox starts out with a blue background and no text
contents. Use the following choices to answer the questions:
A. Blue
B. Yellow
C. Hello
D. Goodbye
E. Blank text
Private Sub btnP2_Click()
txtBox.BackColor = vbYellow
txtBox.Text = “Hello”
End Sub
19. What is the color of the text box after the code executes? (It starts out blue.)
20. What does the text box say after the code executes? (It starts out blank.)
Private Sub btnP3_Click()
txtBox.Text = “Hello”
txtBox.Text = “Goodbye”
End Sub
21. What is the color of the text box after the code executes? (It starts out blue.)
22. What does the text box say after the code executes? (It starts out blank.)
Private Sub btnP4_Click()
btnOutput.BackColor = vbYellow
txtbox.Text = “Hello”
End Sub
23. What is the color of the text box after the code executes? (It starts out blue.)
24. What does the text box say after the code executes? (It starts out blank.)
Use the choices below for the following questions.
A. Black
B. Green
C. Red
D. Blue
E. Purple
25. What color is a comment in the Visual Basic editor?
26. What color is a key word in the Visual Basic editor?
27. What color is a code element such as a plus sign in the Visual Basic editor?
28. What color is a quoted text string in the Visual Basic editor?
29. What character does a comment start with?
A. *
B. ‘
C. “
D. @
Download