100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Other

CP212 Exam Preparation Guide

Rating
-
Sold
-
Pages
23
Uploaded on
23-07-2023
Written in
2022/2023

The "CP212 Exam Preparation Guide" is a concise document designed to assist students in preparing for the "Windows Application Programming" course. It revolves around using VBA for Windows application development, with the main reference being the textbook "VBA for Modellers." The guide likely covers exam format, key topics, and study tips to help students excel in the upcoming exam.

Show more Read less










Whoops! We can’t load your doc right now. Try again or contact support.

Document information

Uploaded on
July 23, 2023
Number of pages
23
Written in
2022/2023
Type
Other
Person
Unknown

Content preview

Chapter 12: Error Handling
Types of Errors
● Syntax/compile errors
● Runtime errors
● Logic errors


Run time errors:
● Two options
○ Ignore error
○ create special code to deal with the situation
● Option 1 - Ignore error
○ On Error Resume Next ‘turns on error handling
Appliation.DisplayAlerts = False
Code that may cause error goes here
On Error GoTo 0 ‘turns off error handling
● Display a message on error with Err Object
○ When an error occurs, an Err object is created
○ The default Number property of the built-in Err object has a nonzero value that an
If statement can check for.





● Option 2 - Handle the error/Write an Error Handler

, ○





■ In the label, if you want to return to the line after the one that caused the
error, use the statement Resume Next.




Chapter 13 - Working with Files and Folders
● Dialogue Boxes for File Operations
○ The FileDialogue object can be used to Open and Save different office file format
○ Different versions of FileDIalogue:
■ msoFileDialogOpen
■ msoFileDialogSaveAs
■ msoFileDialogFilePicker
● user can select multiple files
● All selected files are stored in the SelectedItems collection
■ msoFileDialogFolderPicker
● User select a folder from a dialog box
● Unless Cancel is clicked, the folder is stored it as
Selectedltems(1).

, ○
● The FileSystemObject Object
○ Used to check whether a file exists, rename a file, …. Etc
○ Declare FileSystemObject





○ Methods of FileSystemObject include: CreateFolder, CopyFolder, DeleteFolder,
CreateFile, DeleteFile, CopyFile, FileExists, and GetFolder
● Working with Text Files




CA$11.77
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
WilfridLaurier

Get to know the seller

Seller avatar
WilfridLaurier Wilfrid Laurier
View profile
Follow You need to be logged in order to follow users or courses
Sold
0
Member since
2 year
Number of followers
0
Documents
3
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions