Excel Object Model.

Slides:



Advertisements
Similar presentations
Sep-05 Slide:1 VBA in Excel Walter Milner. Sep-05 Slide:2 VBA in Excel Introduction VBA = Visual Basic for Applications Enables end-user programming In.
Advertisements

Microsoft Excel for beginners. What a spreadsheet is and why you might want one Basic Excel operations How to build a simple spreadsheet Class Objectives:
Microsoft Excel 2002 Microsoft Excel is a powerful spreadsheet program that helps you to organize data complete calculations make decisions graph data.
1 VBA Introduction. Basic Components 2 VBA LANGUAGE OFFICE OBJECTS EXCEL OBJECTS ACCESS OBJECTS WORD OBJECTS OUTLOOK OBJECTS POWERPOINT OBJECTS.
Introduction to Macro Introduction to Visual Basic for Application Recording a Macro Looking at the code of Recorded Macro.
By Angel Aguila. Apply the range name Category to cells A1:C1, as you normally would. When lists are subject to updates, use a dynamic range instead.
® Microsoft Office 2010 Excel Tutorial 1: Getting Started with Excel.
Object Oriented Programming A programming concept which views programs as objects with properties and ways to manipulate the object and the properties.
EXCEL VBA 101 Current Status Waiting Using Excel/VBA to Speed-up Daily Data Processing An Introduction to VBA Yongjun Chen Click Me to Start …
Essence of programming  Branching  Repetitions.
Tutorial 8: Developing an Excel Application
XP New Perspectives on Microsoft Excel 2003, Second Edition- Tutorial 8 1 Microsoft Office Excel 2003 Tutorial 8 – Developing an Excel Application.
AE6382 VBA - Excel l VBA is Visual Basic for Applications l The goal is to demonstrate how VBA can be used to leverage the power of Excel u VBA syntax.
Microsoft Excel 2010 ® ® Tutorial 6: Managing Multiple Worksheets and Workbooks.
Different type of input Use of Basic language with Excel Silvia Patacchini.
Tutorial 12: Enhancing Excel with Visual Basic for Applications
Pasewark & Pasewark Microsoft Office XP: Introductory Course 1 INTRODUCTORY MICROSOFT EXCEL Lesson 7 – Working with Multiple Worksheets.
Introduction to Microsoft Office Excel Office Button Quick Access Toolbar Ribbon Formula Bar Alphabetical Columns Numbered Rows Worksheet Tabs.
Microsoft Excel 2003 Illustrated Complete with Excel Programming.
Macros Excel built-in functions are great but limited Macros are a means for the user to define new functions A macro is a single command that automates.
® Microsoft Office 2010 Excel Tutorial 1: Getting Started with Excel.
Excel 2007 ® Business and Personal Finances What are the different ways you can create and display your Excel 2007 files?
Exploring Microsoft Excel 2002 Chapter 8 Chapter 8 Automating Repetitive Tasks: Macros and Visual Basic for Applications By Robert T. Grauer Maryann Barber.
Microsoft Excel 2000 Adding Visual Elements and Managing Files.
Object Variables Visual Basic for Applications 3.
Project 9 Using Visual Basic for Applications (VBA) to Customize and Automate Excel Jason C. H. Chen, Ph.D. Professor of Management Information Systems.
Microsoft Excel Macros & Excel Solver (IENG490)
Chapter 11: Introduction to the Visual Basic Environment Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University.
University of Toronto at Scarborough © Andria Hunter, Kersti Wain-Bantin CSCA01 VBA 1 Lecture Outline Record macro and examine VBA code VBA Editor (IDE)
® Microsoft Office 2010 Excel Tutorial 2: Formatting a Workbook.
Office 2003 Advanced Concepts and Techniques M i c r o s o f t Excel Integration Feature Object Linking and Embedding (OLE) and Web Discussions.
Working with Numeric Variables (Unit 6) Visual Basic for Applications.
Intro to Excel - Session 1.21 Tutorial 1 - Session 1.2 Using Worksheets to Make Business Decisions.
Visual Basic for Applications Macro Programming For Microsoft Office.
The Object Model Visual Basic for Applications 2.
Chapter 9 Macros And Visual Basic For Applications.
Visual Basic  Is the language for programming in Word, Access,& Excel  Is the “Environment” in which the programming is done (called the Integrated Development.
The Object Model. You can think of the contents of an Excel application as a hierarchy of collections of objects, manipulated by code Each object can.
Chapter 11: Introduction to VBA Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University Name.
Controls and Events. The Next Step In the first module, we discussed general problem solving In this module, we’ll apply what we learned, from specification.
Introduction to Excel VBA UNC Charlotte CPE/PDH Series December 17, 2009.
A lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft® Excel 2013.
Microsoft Office 2003: Advanced 1 ADVANCED MICROSOFT EXCEL Lesson 17 – Working with Multiple Worksheets and Workbooks.
© VBA JETPACK Introduction to VBA.
Via Visual Basic For Applications. Today Context Demonstration The Basics Prereqs: Have attempted to run/record/tweak a macro NEW knowledge Activesheet,
Pasewark & Pasewark Microsoft Office 2003: Introductory 1 INTRODUCTORY MICROSOFT EXCEL Lesson 7 – Working with Multiple Worksheets.
Introduction to Microsoft Excel Macros COE 201- Computer Proficiency.
Lesson 5: Organizing Worksheets and Window Display Microsoft Office Excel 2003 Lesson 5 Organizing Worksheets and Window Display.
Key Concepts 2 Simple VB Procedures Simple VB Applications - take with Other Examples - time permitting.
Instructor: Lisa Barney EXCEL BASICS.  Excel – a spreadsheet application program by Microsoft which uses a grid of cells arranged in numbered rows and.
1 Excel Lesson 7 Working with Multiple Worksheets and Workbooks Microsoft Office 2013 Introductory.
Lecture 6 – Working with VBA Sub Procedures Dr Joanna Wyrobek 1.
COMPREHENSIVE Excel Tutorial 12 Expanding Excel with Visual Basic for Applications.
VBA Excel Macro 1.Create a Macro: To create a macro in Excel VBA, Create a Macro: To create a macro in Excel VBA,Create a Macro: To create a macro.
Lesson 1: Learning Worksheet Fundamentals Microsoft Office Excel 2003 Lesson 1 Learning Worksheet Fundamentals.
The Advantage Series ©2005 The McGraw-Hill Companies, Inc. All rights reserved Chapter 12 Introducing Visual Basic for Applications Microsoft Office Excel.
Excel Lesson 7 Working with Multiple Worksheets and Workbooks
Exploring Excel Chapter 7 Automating Repetitive Tasks: Macros and
VBA - Excel VBA is Visual Basic for Applications
VBA - Excel VBA is Visual Basic for Applications
Tutorial 6: Managing Multiple Worksheets and Workbooks
5. Using databases in VB.
Microsoft Office Illustrated
Excel VBA Day 3 of 3 Tom Vorves.
Exploring Microsoft Excel
درس تطبيقي مادة التربية الفنية للصف الرابع الابتدائي
Microsoft Office Excel 2003
Презентация құру тәсілдері
Шаттық шеңбері.
Wednesday, October 3rd MICROSOFT OFFICE.
Presentation transcript:

Excel Object Model

Object Oriented Programming Property Method Event read write Each object in a Microsoft application has properties which you can view and/or change, methods which you can utilise within a procedure and associated events to which you can attach a sub-routine. Collection Object object

Object Oriented Programming read/write Property Method execute procedure A sub-routine can :- - exchange values with any of an object’s properties - instruct an object to carry out any of its methods - provide code to run when any of an object’s events occur Event triggers

Workbook Object Workbook (object) Worksheets (property) Workbook_Open (event) Close (method) You identify a collection of worksheets by using the enclosing workbook’s Worksheets property. Name (property) ActiveSheet (property) Collection Worksheet Worksheet Worksheet

Object Browser Window LIBRARY PROPERTIES METHODS EVENTS OBJECT CLASS Use the view menu to locate the Object Browser Window and ensure that you have the appropriate libraries selected before searching for the object of interest.

Sub Current_Workbook() Dim wb As Workbook Simple Sub-Routine Sub Current_Workbook() Dim wb As Workbook Set wb = Application.ActiveWorkbook Debug.Print wb.Name Set wb = Application.Workbooks(1) wb.Save End Sub OBJECT PROPERTY METHOD COLLECTION The sub-routine uses the variable wb to manipulate the active workbook.

References To Object Libraries Visual Basic For Applications Microsoft Excel Object Library OLE Automation Microsoft Office Object Library Another Workbook

Simple Object Hierarchy If in doubt about where the object you need lies in the hierarchy, start with the Application object and work down.

Create An Object Add Method new object collection

The object model is not perfectly consistent. Always Remember … The distinction between a property and a method is not always clear-cut. The object model is not perfectly consistent. The sub-routine uses the variable wb to manipulate the active workbook.