CP212 Practice Exam Questions With correct
Answers
Which |programming |concept |can |be |described |as |"The |parts |of |a |program |have |access |to |
which |other |parts?"
a.Logic |
b. |Scope |
c. |Variable
d. |Appearance |- |CORRECT |ANSWER✔✔-Scope
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✔✔-IsDate()
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✔✔-Subroutine-level |scope
On |assigning |a |value |to |a |new |variable |inside |a |function, |it |automatically |becomes |a |global |
variable |
a. |True |
b. |False |- |CORRECT |ANSWER✔✔-False
A |subroutine |cannot |call |a |function |
a. |True |
b. |False |- |CORRECT |ANSWER✔✔-False
What |is |the |name |of |the |VBA |object |that |represents |an |Excel |file |
a. |Workbook |
b. |Spreadsheet
c. |Application |
d. |Worksheet |- |CORRECT |ANSWER✔✔-Workbook
Which |VBA |command |will |allow |the |user |to |access |values |from |a |Userform |called |myUserform
|before |the |Userform |is |displayed |to |the |user?
a. |Load |myUserform |
, b. |Display |myUserform |
c. |Show |myUserform |
d. |Hide |myUserform |- |CORRECT |ANSWER✔✔-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✔✔-Show |myUserform
A |Userform |that |allows |you |to |keep |working |in |Excel |while |its |open |is |called |_____________
a. |Modeless |
b. |Moded |
c. |Modular
d. |Modal |- |CORRECT |ANSWER✔✔-Modal
What |is |the |line |of |code |used |to |have |your |program |continue |when |an |unusual |error |
happens?
a. |On |Error |GoTo |0 |
b. |On |Error |Resume |Next
c. |On |Error |Return |
d. |On |Error |Resume |Last |- |CORRECT |ANSWER✔✔-On |Error |Resume |Next
Answers
Which |programming |concept |can |be |described |as |"The |parts |of |a |program |have |access |to |
which |other |parts?"
a.Logic |
b. |Scope |
c. |Variable
d. |Appearance |- |CORRECT |ANSWER✔✔-Scope
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✔✔-IsDate()
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✔✔-Subroutine-level |scope
On |assigning |a |value |to |a |new |variable |inside |a |function, |it |automatically |becomes |a |global |
variable |
a. |True |
b. |False |- |CORRECT |ANSWER✔✔-False
A |subroutine |cannot |call |a |function |
a. |True |
b. |False |- |CORRECT |ANSWER✔✔-False
What |is |the |name |of |the |VBA |object |that |represents |an |Excel |file |
a. |Workbook |
b. |Spreadsheet
c. |Application |
d. |Worksheet |- |CORRECT |ANSWER✔✔-Workbook
Which |VBA |command |will |allow |the |user |to |access |values |from |a |Userform |called |myUserform
|before |the |Userform |is |displayed |to |the |user?
a. |Load |myUserform |
, b. |Display |myUserform |
c. |Show |myUserform |
d. |Hide |myUserform |- |CORRECT |ANSWER✔✔-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✔✔-Show |myUserform
A |Userform |that |allows |you |to |keep |working |in |Excel |while |its |open |is |called |_____________
a. |Modeless |
b. |Moded |
c. |Modular
d. |Modal |- |CORRECT |ANSWER✔✔-Modal
What |is |the |line |of |code |used |to |have |your |program |continue |when |an |unusual |error |
happens?
a. |On |Error |GoTo |0 |
b. |On |Error |Resume |Next
c. |On |Error |Return |
d. |On |Error |Resume |Last |- |CORRECT |ANSWER✔✔-On |Error |Resume |Next