Question

In this exercise, you will write expressions that refer to some of the objects in the...

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.

wcsYHHRyqAvvQAAAABJRU5ErkJggg==

  1. How many collections are shown in the above figure?
  2. 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?
  3. What expression can be used to refer to the running Application, i.e. Microsoft Excel?
  4. What expression can be used to refer to the Workbooks collection?
  5. What expression can be used to refer to the Workbook object whose name is “My Workbook.xlsm”?
  6. What expression can be used to refer to the second Worksheet object contained in the Workbook object whose name is “My Workbook.xlsm”?
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer a) A collections is a group of same object in excel. In the diagram there are 2 collection, one is Workbooks which is a collection of workbook,and the second one is Worksheets which is a collection of worksheet. So Application is not a collection because it is a single object.

Answer b) In the Workbooks collection, the member object is Workbook and in the Worksheets collection the member object is Worksheet.

Answer c) The expression which is used is Application.Workbooks()

Answer d) Suppose we want to close the workbooks, so the expression will be Workbooks.Close()

Answer e) To refer to the workbook object we can use, suppose we want to close the workbook. Application.Workbooks("My Workbook.xlsm").Close

Here Application, then the workbooks collection, then the workbook, then the close method is called. So we can refer as Application.Workbooks("My Workbook.xlsm")

Answer f) We can refer like this way. We are writing a word data in A2 cell.

Application.Workbooks("My Workbook.xlsm").Worksheets(2).Range("A2") = "Data"

Here we are referring to second worksheet of "My Workbook.xlsm", here we are using Worksheets collection.

Add a comment
Know the answer?
Add Answer to:
In this exercise, you will write expressions that refer to some of the objects in the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • An array of class objects is similar to an array of some other data type. To...

    An array of class objects is similar to an array of some other data type. To create an array of Points, we write Point parray [4]; To access the object at position i of the array, we write parray [i] and to call a method on that object method, we write parray [i]. methodName (arg1 , arg2 , ...) ; To initialize an array of objects whose values are known at compile time, we can write Point parray [4] =...

  • Write three object-oriented classes to simulate your own kind of team in which a senior member...

    Write three object-oriented classes to simulate your own kind of team in which a senior member type can give orders to a junior member type object, but both senior and junior members are team members. So, there is a general team member type, but also two specific types that inherit from that general type: one senior and one junior. Write a Python object-oriented class definition that is a generic member of your team. For this writeup we call it X....

  • When answering this question, can you please specify what you name your files? Thank you! Write a...

    When answering this question, can you please specify what you name your files? Thank you! Write a Java application, and an additional class to represent some real-world entity. Keep in mind that a class is a model in code of something real or imagined, which has attributes (member variables) and behaviors (member methods). The class will: a. Create a total of 5 member variables for the class, selecting the appropriate data types for each field. For example, a class to...

  • C++ Could you check my code, it work but professor said that there are some mistakes(check...

    C++ Could you check my code, it work but professor said that there are some mistakes(check virtual functions, prin() and others, according assignment) . Assignment: My code: #include<iostream> #include<string> using namespace std; class BasicShape { //Abstract base class protected: double area; private:    string name; public: BasicShape(double a, string n) { area=a; name=n; } void virtual calcArea()=0;//Pure Virtual Function virtual void print() { cout<<"Area of "<<getName()<<" is: "<<area<<"\n"; } string getName(){    return name; } }; class Circle : public...

  • The questions below deal with Microsoft Visual Studio 2012 Reloaded, under the Visual Basic programming language....

    The questions below deal with Microsoft Visual Studio 2012 Reloaded, under the Visual Basic programming language. The book ISBN number that I am using is: 978-1-285-08416-9 or the UPC code is: 2-901285084168-1. Question 1 Visual Basic 2012 is an object-oriented programming language, which is a language that allows the programmer to use ____________________ to accomplish a program�s goal. Question 2 An application that has a Web user interface and runs on a server is called a(n) ____________________ application. Question 3...

  • Write a program in C++ that simulates a soft drink machine. The program will need several...

    Write a program in C++ that simulates a soft drink machine. The program will need several classes: DrinkItem, DrinkMachine and Receipt. For each of the classes you must create the constructors and member functions required below. You can, optionally, add additional private member functions that can be used for doing implementation work within the class. DrinkItem class The DrinkItem class will contains the following private data members: name: Drink name (type of drink – read in from a file). Type...

  • D Question 12 1.5 pts Check the true statements about NumPy arrays: O A single instantiated NumPy array can store multi...

    D Question 12 1.5 pts Check the true statements about NumPy arrays: O A single instantiated NumPy array can store multiple types (e.g., ints and strings) in its individual element positions. A NumPy array object can be instantiated using multiple types (e.g., ints and strings) in the list passed to its constructor O Memory freeing will require a double-nested loop. The number of bits used to store a particular NumPy array object is fixed. O The numpy.append(my.array, new_list) operation mutates...

  • You will write the following files: mystack.h - contains the class definition for the mystack class....

    You will write the following files: mystack.h - contains the class definition for the mystack class. mystack.cpp - contains the definitions for member functions of the mystack class. inpost.cpp - contains your convert() function. inpost.h - contains the function prototype for convert() so that the main() can call it. Each of the files (with the exception of inpost.h) is described in more detail below. All header files should contain header guards to prevent them from being included multiple times in...

  • Your will write a class named Gasket that can be used to build Gasket objects (that...

    Your will write a class named Gasket that can be used to build Gasket objects (that represent Sierpinski gaskets) that you can display graphically.  Your Gasket class is defined in the provided file Gasket.h.   DO NOT CHANGE the file Gasket.h.  The attributes and methods defined for class Gasket are described below.     ·sideLength            an int that holds the length of each side of the Gasket.  The length of the side is measured as a number of pixels ·xLocation              an int that holds the x coordinate (in pixels)...

  • In c# So far, you have created object-oriented code for individual classes. You have built objects...

    In c# So far, you have created object-oriented code for individual classes. You have built objects from these classes. Last week, you created a UML for new inherited classes and objects. Finally, you have used polymorphism. When you add abstraction to this mix, you have the “4 Pillars of OOP.” Now, you begin putting the pieces together to create larger object-oriented programs. Objectives for the project are: Create OO classes that contain inherited and polymorphic members Create abstracted classes and...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT