Application
Global Methods and Properties
The following methods and properties of the Application object are global and therefore can be used without the Application prefix.
Application.ActiveCell
ActiveCell
This list can be obtained from the top list of classes in the Object Browser.
ActiveCell | |
ActiveChart | |
ActivePrinter | |
ActiveSheet | |
ActiveWindow | |
ActiveWorkbook | |
Addins | |
Assistant | |
Calendar | |
Cells | |
Charts | |
Columns | |
CommandBars | |
Creator | |
Date | |
DDEAppReturnCode | |
Names | |
Now | |
Parent | |
Range | |
Rows | |
Selection | |
Sheets | |
ThisWorkbook | |
Time | |
Timer | |
UserForms | |
Windows | |
Workbooks | |
WorksheetFunction | |
Worksheets |
Application.Caller
The Caller property of the Application object returns a reference to the object that called (or executed a macro procedure).
This property applies to controls on the Forms toolbar and drawing objects that have macros attached.
It is also particularly useful in determining the cell that called a user defined function.
Public Function WorksheetName() As String
Application.Volatile = True
WorksheetName = Application.Caller.Parent.Name
End Function
You cannot use "ActiveSheet.Name" in case the calculation is invoked when a different worksheet is selected.
© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext