Excel Application Menu
The Excel Application menu in Code VBA provides structured access to the most important features of the Excel Application object. It places the most frequently used automation commands at the top, followed by methods, properties, navigation tools, code libraries, and object-returning members that help you write VBA code quickly and correctly.
Most Used Excel Application Features
The top section contains the commands Excel developers use most often. These insert ready-made code fragments that perform common workbook operations, show dialogs, combine ranges, and control Excel’s global behavior.
- Open Workbook - Insert code to open an existing workbook.
- New Workbook - Insert code to create a new workbook.
- GetSaveAsFilename - Show a Save As dialog and return the chosen filename.
- Union - Combine multiple ranges into one.
- Intersect - Return the overlapping part of multiple ranges.
- ScreenUpdating - Turn screen updating on or off.
- Calculation - Set calculation mode (Automatic, Manual, etc.).
- EnableEvents - Enable or disable event handling.
- DisplayAlerts - Suppress Excel prompts during automation.
Methods and Properties
This section lists the methods and properties of the Excel Application object. Selecting an item inserts the corresponding VBA code directly into your module. This avoids searching the Object Browser and ensures correct syntax.
Examples include methods such as Quit or Calculate, and properties such as
ActiveWorkbook, Version, or Path.
Find
The Find command opens the Code VBA Find Procedure tool, which searches your project for procedures related to the selected Excel object or containing a specific keyword. This feature is described here: Find Procedure.
Library
The Library entry gives access to reusable code snippets. These come from the Code VBA library and any custom libraries you have added. They help you insert common patterns or best-practice code quickly. More information: VBA Code Reuse.
Related Classes (Range → Windows)
This group lists the main Application members that return objects. Choosing one inserts code that declares and sets a variable of the corresponding type. This makes it easy to work with Excel objects through variables rather than direct references.
- Range - Returns a
Rangeobject. - Workbook - Returns a
Workbookobject. - Worksheet - Returns a
Worksheetobject. - Charts - Returns a
Chartscollection. - Windows - Returns the
Windowscollection.
Example of generated code:
Dim rngActiveCell As Range
Set rngActiveCell = ActiveCell
Single Object Members
The next group lists Application members that return a single object reference, such as:
- ActiveChart
- AutoCorrect
- ActiveWindow
- ActiveWorkbook
These entries let you work directly with the currently active object without declaring additional variables. This keeps your code short and avoids unnecessary declarations.
Together, these menu sections make the Excel Application menu a powerful tool for inserting correct, context-aware VBA code for Excel automation.