Thursday, 7 September 2017

VBA Class

Day 3

Windows  Excel objects

Application Objects
Workbooks Objects
Worksheets Objects
Range Objects


Application Objects

The Application object consists of the following −
  • Application-wide settings and options.
  • Methods that return top-level objects, such as ActiveCell, ActiveSheet, and so on.
 
Application Object example
 
Set xlapp = Createobject(“Excel.Sheet”)
Xlapp.application.workbooks.open “C:\test.xls”
Application.windows(“text.xls”).activate
 
Application.activecell.font.bold=true


Workbook Objects

The Work book object is member of the Workbooks collection and contains all the Workbook objects currently in Excel.

Example:

Workbooks.Close

Continue---

No comments:

Post a Comment

JOTHIDAM KARPOM VANGA