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

CP212 Midterm Preparation Guide

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

The "CP212 Midterm 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 Midterm.

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
19
Written in
2022/2023
Type
Other
Person
Unknown

Content preview

Chapter 1:

Excel Basics:

● Cell styles
● Data Validation
● Protecting Worksheets
○ Review → Protect sheet
● Adding notes


Chapter 2:
● Subroutine (sub), a macro:
○ Programmers → subroutine/procedure
○ Spreadsheet users → macro
● Program → all subs in an application
● Sub → performs one specific task in the overall program


Excel object model:
● Objects → Properties (describe an object)→ methods → argument for
methods/events


Excel objects:
● Object→ Range
● Properties → value, formula, alignment
● Methods → clear contents, copy
➔ Event handler: code that runs whenever event fires


To change the color of the active cell:
● ActiveCell.Interior.Color = 255 (VbRed)

,VBE Basics:
● IDE for programming with VBA on excel
● How to open it ?
○ Press Visual Basic OR Alt + F11
● Extensions:
○ Spreadsheets → xlsx
○ Macro → xlsm


● Features:
○ View TAB
○ Code Window
○ Project Explorer Window
■ Project (workbook)
● List of spreadsheets
■ Modules Folder
● List of modules
■ Forms
● List of user forms
○ Properties Window
■ Content depend on the selected object
○ Immediate Window
■ One-line VBA commands
○ Object Browser


● More Features:
○ Auto complete sub → end sub
○ Colors —> blue for keyword, red for syntax error, green for comments
○ Case INSENSITIVE

, Chapter 3:
● Macros:
○ Macros = procedure = subs
■ VBA codes that perform a set of actions
○ Loops & control logic → cannot be recorded


Recording Macros:
○ Developer Tab → record macros
○ Taskbar → left hand corner
● Toolbar:
● Saving → can be added to Quick access toolbar (QAT)


Drawbacks:
○ Recorded code is difficult to read
○ duplicate /create sheet → shows error




Chapter 5:

● Subroutines:
○ VBA set of code that performs a specific task
■ Sub → macro
○ Program contains multiple sub
○ Located → in module
■ VBE → insert → module
■ Sub name cannot contain space (camel case)
■ First sub → main sub
CA$11.35
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