Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Excel Object Model. 2 Object Oriented Programming Object PropertyMethod Event readwrite Collection object Object.

Similar presentations


Presentation on theme: "1 Excel Object Model. 2 Object Oriented Programming Object PropertyMethod Event readwrite Collection object Object."— Presentation transcript:

1 1 Excel Object Model

2 2 Object Oriented Programming Object PropertyMethod Event readwrite Collection object Object

3 3 Object Oriented Programming Object Property Method Event procedure read/write execute triggers

4 4 Workbook Object Workbook (object) Worksheets (property) Close (method) Workbook_Open (event) Collection Worksheet Name (property) ActiveSheet (property)

5 5 Object Browser Window LIBRARY OBJECT CLASS PROPERTIES METHODS EVENTS

6 6 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

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

8 8 Simple Object Hierarchy Application Workbook Worksheet Range (of cells) Range (of cells)

9 9 Create An Object collection Add Method new object

10 10 Always Remember … The distinction between a property and a method is not always clear-cut. The object model is not perfectly consistent.


Download ppt "1 Excel Object Model. 2 Object Oriented Programming Object PropertyMethod Event readwrite Collection object Object."

Similar presentations


Ads by Google