CP212 Exam Review Questions With Correct
Answers
Which |programming |concept |can |be |described |as |"The |parts |of |a |program |have |access |to |
which |other |parts?" |- |CORRECT |ANSWER✔✔-The |Scope
What |VBA |function |can |be |used |to |check |to |see |if |a |value |is |a |vlid |date |- |CORRECT |
ANSWER✔✔-isDate()
What |is |the |scope |of |the |salary |variable
Sub |Test1()
| Dim |salary |As |Currency
| salary |= |5000
End |Sub |- |CORRECT |ANSWER✔✔-subroutine |level |scope
On |assigning |a |value |to |a |new |variable |inside |a |function |it |automatically |becomes |a |global |
variable |(T/F) |- |CORRECT |ANSWER✔✔-False
A |subroutine |cannot |call |a |function |(T/F) |- |CORRECT |ANSWER✔✔-False
What |is |the |name |of |the |VBA |object |that |represents |an |excel |file |- |CORRECT |ANSWER✔✔-
Workbook
Which |VBA |command |will |allow |you |to |access |values |from |a |Userform |called |myUserform |
before |the |Userform |is |displayed |to |the |user |- |CORRECT |ANSWER✔✔-Load |myUserform
, Which |VBA |statement |is |typically |used |to |display |a |Userform |called |myUserform |on |the |screen
|for |the |first |time |- |CORRECT |ANSWER✔✔-Show |myUserform
A |Userform |that |allows |you |to |keep |working |in |Excel |while |its. |open |is |called: |- |CORRECT |
ANSWER✔✔-Modal
What |is |the |line |of |code |used |to |have |your |program |continue |when |an |unusual |error |happens
|- |CORRECT |ANSWER✔✔-On |Error |Resume |Next
What |line |of |code |is |used |to |turn |error |handling |off |- |CORRECT |ANSWER✔✔-On |Error |Go |To |0
In |the |following |code |what |is |the |word |"DataEnrtyError" |called |in |VBA?
Sub |someErrors()
| On |Error |Go |To |DataEntryError
| Statement
| On |Error |Go |To |0
| Exit |Sub
DataEntryError:
| MsgBox |"Error"
End |Sub |- |CORRECT |ANSWER✔✔-Label
You |are |working |on |an |application |where |all |the |customer |files |are |kept |in |the |same |folder, |
but |you |don't |know |which |folder. |Which |is |the |better |solution |for |a |graphical |interface-based |
application? |- |CORRECT |ANSWER✔✔-Display |a |folder |picker |dialog |box |so |the |user |can |select |
the |right |folder
Answers
Which |programming |concept |can |be |described |as |"The |parts |of |a |program |have |access |to |
which |other |parts?" |- |CORRECT |ANSWER✔✔-The |Scope
What |VBA |function |can |be |used |to |check |to |see |if |a |value |is |a |vlid |date |- |CORRECT |
ANSWER✔✔-isDate()
What |is |the |scope |of |the |salary |variable
Sub |Test1()
| Dim |salary |As |Currency
| salary |= |5000
End |Sub |- |CORRECT |ANSWER✔✔-subroutine |level |scope
On |assigning |a |value |to |a |new |variable |inside |a |function |it |automatically |becomes |a |global |
variable |(T/F) |- |CORRECT |ANSWER✔✔-False
A |subroutine |cannot |call |a |function |(T/F) |- |CORRECT |ANSWER✔✔-False
What |is |the |name |of |the |VBA |object |that |represents |an |excel |file |- |CORRECT |ANSWER✔✔-
Workbook
Which |VBA |command |will |allow |you |to |access |values |from |a |Userform |called |myUserform |
before |the |Userform |is |displayed |to |the |user |- |CORRECT |ANSWER✔✔-Load |myUserform
, Which |VBA |statement |is |typically |used |to |display |a |Userform |called |myUserform |on |the |screen
|for |the |first |time |- |CORRECT |ANSWER✔✔-Show |myUserform
A |Userform |that |allows |you |to |keep |working |in |Excel |while |its. |open |is |called: |- |CORRECT |
ANSWER✔✔-Modal
What |is |the |line |of |code |used |to |have |your |program |continue |when |an |unusual |error |happens
|- |CORRECT |ANSWER✔✔-On |Error |Resume |Next
What |line |of |code |is |used |to |turn |error |handling |off |- |CORRECT |ANSWER✔✔-On |Error |Go |To |0
In |the |following |code |what |is |the |word |"DataEnrtyError" |called |in |VBA?
Sub |someErrors()
| On |Error |Go |To |DataEntryError
| Statement
| On |Error |Go |To |0
| Exit |Sub
DataEntryError:
| MsgBox |"Error"
End |Sub |- |CORRECT |ANSWER✔✔-Label
You |are |working |on |an |application |where |all |the |customer |files |are |kept |in |the |same |folder, |
but |you |don't |know |which |folder. |Which |is |the |better |solution |for |a |graphical |interface-based |
application? |- |CORRECT |ANSWER✔✔-Display |a |folder |picker |dialog |box |so |the |user |can |select |
the |right |folder