Let’s Learn Excel VBA – Part 2


Ms-Office Accelerators

As per Excel object model and the hierarchy we can define all the major objects in 4 levels.

Level -1Level -2Level -3Level -4
ApplicationDetails
Workbooks (Collection)Details
WorkbookDetails
Worksheets (Collection)Details
WorksheetDetails
Cells (All Cells of a Worksheet)Details
Cell (A Particular Cell)Details
Range (A set of Cell)Details
PivotTables (Collection)Details
PivotTableDetails
ColumnsDetails
RowsDetails
ShapesDetails
UsedRangeDetails
ChartObjectsDetails
Charts (Collection)Details
ChartDetails

As per this, if we want to refer to a chart we can refer like Application.Workbooks(“Book1”).charts(“Chart1”).

Or If to refer a pivot table Application.Workbooks(“Book1”).Worksheets(“Sheet1”).Pivottables(“Pivot1”).

Now, we have a clear understanding of the Excel object model and how to refer them. To start writing simple programming we also need to know some more about VBA.

View original post