Application object

Application object is the highest by hierarchy among VBA Excel objects. It has a host of subordinate objects as well as about 170 properties that can influence application behavior. Objects generally have many properties and there is no need to remember each one of them, we should only remember the most important ones that we will use in our day-to-day work. The following is an overview of the most important properties of the Application object.

The most commonly used Application object properties are:

ActiveCell indicates the active cell in the worksheet and it is being used to manipulate the active cell. For example, if we want to delete it we will use the command:

Application.ActiveCell.Delete

ActiveChart indicates an active chart. For example, if we want to assign a title to it we will use the command:

Application.ActiveChart.ChartTitle.Caption = “Title”

ActiveSheet indicates an active worksheet, and with this property we access the worksheet and other objects on it. For example, if we want to enter value 1 in cell A1, we would use the command:

Application.ActiveSheet.Cells (1, 1) = 1

ActiveWindow and ActiveWorkbook, similar to the previous features, allow us to access an active window or workbook. In addition to the listed properties, this object also has a variety of methods. Take advantage of the Object Browser to get to know them and find out what you need to complete the task you are working on.