100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
CP212 Midterm Preparation Guide CA$11.47   Add to cart

Other

CP212 Midterm Preparation Guide

 44 views  0 purchase

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 c...

[Show more]

Preview 3 out of 19  pages

  • July 23, 2023
  • 19
  • 2022/2023
  • Other
  • Unknown
book image

Book Title:

Author(s):

  • Edition:
  • ISBN:
  • Edition:
All documents for this subject (4)
avatar-seller
WilfridLaurier
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

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller WilfridLaurier. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for CA$11.47. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

79650 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
CA$11.47
  • (0)
  Add to cart