HW 1: VBA and Object Model
VerifiedAdded on 2019/09/18
|2
|580
|174
Homework Assignment
AI Summary
This homework assignment focuses on understanding and applying the VBA object model in Microsoft Office applications, specifically Excel, Word, and PowerPoint. It includes exercises on referencing objects and collections, identifying correct syntax for accessing elements, and exploring online resources for VBA programming. The assignment requires students to write expressions to refer to various objects, correct faulty instructions, and select useful VBA learning websites.

HW 1: Intro. to VBA and the Object Model (25 pts. Total)
1. (6 pts) In this exercise, you will write expressions that refer to some of
the objects in the Excel object model, which is shown in the following figure.
a. How many collections are shown in the above figure?
b. For each of these collections, what type of objects are the members of
this collection. For example, if the collection is people, the type of its
member would be person?
c. What expression can be used to refer to the running Application, i.e.
Microsoft Excel?
d. What expression can be used to refer to the Workbooks collection?
e. What expression can be used to refer to the Workbook object whose
name is “My Workbook.xlsm”?
f. What expression can be used to refer to the second Worksheet object
contained in the Workbook object whose name is “My
Workbook.xlsm”?
2. (6 pts) In this exercise, you will write references to the objects found in a
portion of the Microsoft Word object model, which is shown in the following
figure.
a. How many collections are shown in the above figure?
b. What expression can be used to refer to the running Application, i.e.
Microsoft Word?
c. What expression can be used to refer to the Documents collection?
d. What expression can be used to refer to the Document whose name is
“My Document.docx” in the Documents collection?
e. What expression can be used to refer to the first sentence contained in
the Document whose name is “My Document.docx”?
f. What expression can be used to refer to the second word contained in
the Document whose name is “My Document.docx”?
1. (6 pts) In this exercise, you will write expressions that refer to some of
the objects in the Excel object model, which is shown in the following figure.
a. How many collections are shown in the above figure?
b. For each of these collections, what type of objects are the members of
this collection. For example, if the collection is people, the type of its
member would be person?
c. What expression can be used to refer to the running Application, i.e.
Microsoft Excel?
d. What expression can be used to refer to the Workbooks collection?
e. What expression can be used to refer to the Workbook object whose
name is “My Workbook.xlsm”?
f. What expression can be used to refer to the second Worksheet object
contained in the Workbook object whose name is “My
Workbook.xlsm”?
2. (6 pts) In this exercise, you will write references to the objects found in a
portion of the Microsoft Word object model, which is shown in the following
figure.
a. How many collections are shown in the above figure?
b. What expression can be used to refer to the running Application, i.e.
Microsoft Word?
c. What expression can be used to refer to the Documents collection?
d. What expression can be used to refer to the Document whose name is
“My Document.docx” in the Documents collection?
e. What expression can be used to refer to the first sentence contained in
the Document whose name is “My Document.docx”?
f. What expression can be used to refer to the second word contained in
the Document whose name is “My Document.docx”?
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

3. (2 pts) Which of the following instructions will display the number of slides
contained in the third Presentation object, which is named “March.ppt”?
a. print Application.Presentations("March.ppt").Slides.Count
b. print Application.Presentations.Slides(3).Count
c. print Application.Slides.Presentations("March.ppt").Count
d. print Application.Slides.Presentations(3).Count
4. (3 pts) The following instruction is supposed to display the name of the
fourth slide contained in the December.ppt presentation, but it is not working
correctly. Correct the instruction.
? Application.Presentation(December.ppt).Slide(4).Name
5.(8 pts) Explore websites that provide useful information about VBA
programming. Select three of them that you think would be most useful to
you in the future (including doing the project in this course). At least one of
them has to be where you can post VBA questions and get answers fairly
quickly. List the url’s of the three web sites you have chosen and explain the
rationale for the choices. Make sure that the website you list includes
resources on VBA specifically, not on VB (Visual Basic is related to VBA, but
they are not the same) or just Excel. For example, http://www.vbtutor.net/ is
a resource site on VB, but not on VBA. The whole write up for this problem
should be less than a page.
contained in the third Presentation object, which is named “March.ppt”?
a. print Application.Presentations("March.ppt").Slides.Count
b. print Application.Presentations.Slides(3).Count
c. print Application.Slides.Presentations("March.ppt").Count
d. print Application.Slides.Presentations(3).Count
4. (3 pts) The following instruction is supposed to display the name of the
fourth slide contained in the December.ppt presentation, but it is not working
correctly. Correct the instruction.
? Application.Presentation(December.ppt).Slide(4).Name
5.(8 pts) Explore websites that provide useful information about VBA
programming. Select three of them that you think would be most useful to
you in the future (including doing the project in this course). At least one of
them has to be where you can post VBA questions and get answers fairly
quickly. List the url’s of the three web sites you have chosen and explain the
rationale for the choices. Make sure that the website you list includes
resources on VBA specifically, not on VB (Visual Basic is related to VBA, but
they are not the same) or just Excel. For example, http://www.vbtutor.net/ is
a resource site on VB, but not on VBA. The whole write up for this problem
should be less than a page.
1 out of 2
Related Documents
Your All-in-One AI-Powered Toolkit for Academic Success.
+13062052269
info@desklib.com
Available 24*7 on WhatsApp / Email
Unlock your academic potential
Copyright © 2020–2025 A2Z Services. All Rights Reserved. Developed and managed by ZUCOL.





