CP212 Final Exam Questions With Correct
Answers
1. |Which |programming |concepts |can |be |described |as |"the |parts |of |program |have |access |to |
which |other |parts?"
a. |Logic
b. |Scope
c. |Variable
d. |Appearance |- |CORRECT |ANSWER✔✔-b. |Scope
1. |What |VBA |function |can |be |used |to |check |to |see |if |a |value |is |a |valid |date?
a. |isValidDate()
b. |isDate()
c. |isFloat()
d. |isNumeric() |- |CORRECT |ANSWER✔✔-b. |isDate()
1. |in |the |code |below, |what |is |the |scope |of |the |salary |variable?
Sub |Test1()
| Dim |salary |As |Currency |
| salary |= |5000
End |Sub
a. |subroutine- |level |scope
b. |form-level |scope
,c. |project-level |scope
d. |module-level |scope |- |CORRECT |ANSWER✔✔-a. |Subroutine-Level |scope
1. |on |assignment |a |value |to |a |new |variable |inside |a |function, |it |automatically |becomes |a |
global |variable.
a. |true
b. |false |- |CORRECT |ANSWER✔✔-b. |False
1. |a |subroutine |cannot |call |a |function.
a. |true
b. |false |- |CORRECT |ANSWER✔✔-a. |True
1. |what |is |the |name |of |the |VBA |object |that |represents |an |excel |file.
a. |Workbook
b. |Spreadsheet
c. |Application
d. |Worksheet |- |CORRECT |ANSWER✔✔-a. |Workbook
Which |VBA |command |will |allow |you |to |access |values |from |a |Userform |called |myUserform |on |
the |screen |for |the |first |time?
a. |Show |myUserform
b. |Hide |myUserform
c. |Display |myUserform
d. |Load |myUserform |- |CORRECT |ANSWER✔✔-d. |Load |myUserform
Which |VBA |statement |is |typically |used |to |display |a |Userform |called |myUserform |on |the |screen
|for |the |first |time?
, a. |Show |myUserform
b. |Hide |myUserform
c. |Display |myUserform
d. |Load |myUserform |- |CORRECT |ANSWER✔✔-a. |Show |myUserform
1. |A |Userform |that |allows |you |to |keep |working |in |excel |while |its |open |is |called
a. |Modules
b. |Moded
c. |Modular
d. |Modal |- |CORRECT |ANSWER✔✔-d. |Modal
1. |What |is |the |line |code |used |to |have |your |program |continue |when |an |unusual |error |
happens?
a. |On |error |Go |To |0
b. |On |error |resume |next
c. |On |error |return
d. |On |error |resume |last |- |CORRECT |ANSWER✔✔-b. |On |error |resume |next
1. |What |line |of |code |is |used |to |turn |error |handling |off?
a. |On |error |Go |To |0
b. |On |error |resume |next
c. |On |error |return
d. |On |error |resume |last |- |CORRECT |ANSWER✔✔-a. |On |error |Go |To |0
1. |In |the |following |code, |what |I |the |word |"Data |Entry |Error" |called |In |VBA?
Answers
1. |Which |programming |concepts |can |be |described |as |"the |parts |of |program |have |access |to |
which |other |parts?"
a. |Logic
b. |Scope
c. |Variable
d. |Appearance |- |CORRECT |ANSWER✔✔-b. |Scope
1. |What |VBA |function |can |be |used |to |check |to |see |if |a |value |is |a |valid |date?
a. |isValidDate()
b. |isDate()
c. |isFloat()
d. |isNumeric() |- |CORRECT |ANSWER✔✔-b. |isDate()
1. |in |the |code |below, |what |is |the |scope |of |the |salary |variable?
Sub |Test1()
| Dim |salary |As |Currency |
| salary |= |5000
End |Sub
a. |subroutine- |level |scope
b. |form-level |scope
,c. |project-level |scope
d. |module-level |scope |- |CORRECT |ANSWER✔✔-a. |Subroutine-Level |scope
1. |on |assignment |a |value |to |a |new |variable |inside |a |function, |it |automatically |becomes |a |
global |variable.
a. |true
b. |false |- |CORRECT |ANSWER✔✔-b. |False
1. |a |subroutine |cannot |call |a |function.
a. |true
b. |false |- |CORRECT |ANSWER✔✔-a. |True
1. |what |is |the |name |of |the |VBA |object |that |represents |an |excel |file.
a. |Workbook
b. |Spreadsheet
c. |Application
d. |Worksheet |- |CORRECT |ANSWER✔✔-a. |Workbook
Which |VBA |command |will |allow |you |to |access |values |from |a |Userform |called |myUserform |on |
the |screen |for |the |first |time?
a. |Show |myUserform
b. |Hide |myUserform
c. |Display |myUserform
d. |Load |myUserform |- |CORRECT |ANSWER✔✔-d. |Load |myUserform
Which |VBA |statement |is |typically |used |to |display |a |Userform |called |myUserform |on |the |screen
|for |the |first |time?
, a. |Show |myUserform
b. |Hide |myUserform
c. |Display |myUserform
d. |Load |myUserform |- |CORRECT |ANSWER✔✔-a. |Show |myUserform
1. |A |Userform |that |allows |you |to |keep |working |in |excel |while |its |open |is |called
a. |Modules
b. |Moded
c. |Modular
d. |Modal |- |CORRECT |ANSWER✔✔-d. |Modal
1. |What |is |the |line |code |used |to |have |your |program |continue |when |an |unusual |error |
happens?
a. |On |error |Go |To |0
b. |On |error |resume |next
c. |On |error |return
d. |On |error |resume |last |- |CORRECT |ANSWER✔✔-b. |On |error |resume |next
1. |What |line |of |code |is |used |to |turn |error |handling |off?
a. |On |error |Go |To |0
b. |On |error |resume |next
c. |On |error |return
d. |On |error |resume |last |- |CORRECT |ANSWER✔✔-a. |On |error |Go |To |0
1. |In |the |following |code, |what |I |the |word |"Data |Entry |Error" |called |In |VBA?