- VBA Automation for Excel 2019 Cookbook
- Mike Van Niekerk
- 266字
- 2021-06-11 18:16:28
Using the VBA Editor
We've worked with the VBA Editor before, but that was on another file, with a different Sub procedure. The recipe we're going to work with here will show you how to activate the VBA Editor in your own file. Furthermore, we're going to identify various components within the editor.
Getting ready
With 02_RecordMacro.xlsx still open, we're going to activate the VBA Editor. Whether you are on Sheet1, Sheet2, or Sheet3 is of no consequence, because the macro is part of the workbook.
How to do it…
Let's go through the steps for this recipe:
- The standard way to activate the VBA Editor is to navigate to Developer | Code | Macros, and then select Edit on the Macro dialog box.
- The shortcut key makes life much easier. Simply hold down the Alt key while pressing F11. This time, you bypass the dialog box by going straight to the VBA Editor:

Figure 1.15 – A Sub procedure in the VBA Editor
The evidence of what we recorded is displayed in the code window.
How it works…
Opening the VBA Editor can be done in one of two ways: with the Alt + F11 keyboard shortcut, or by clicking on Edit in the Macro dialog box.
In the VBA Editor, you will find the following basic components:

Figure 1.16 – Components of the VBA Editor
There's more…
Each element, or component, of the VBA Editor has a specific function. Up until now, we've only used the code window. In future recipes, we will be referring to and using the other elements.
- 深入淺出Prometheus:原理、應(yīng)用、源碼與拓展詳解
- DevOps Automation Cookbook
- Learning ELK Stack
- 軟件架構(gòu):Python語言實(shí)現(xiàn)
- 小學(xué)生C++創(chuàng)意編程(視頻教學(xué)版)
- Scala編程實(shí)戰(zhàn)(原書第2版)
- Julia高性能科學(xué)計(jì)算(第2版)
- Android開發(fā)三劍客:UML、模式與測(cè)試
- Spring MVC+MyBatis開發(fā)從入門到項(xiàng)目實(shí)踐(超值版)
- JBoss:Developer's Guide
- Getting Started with Python
- 深度學(xué)習(xí)入門:基于Python的理論與實(shí)現(xiàn)
- Java高并發(fā)編程詳解:深入理解并發(fā)核心庫(kù)
- Python數(shù)據(jù)預(yù)處理技術(shù)與實(shí)踐
- Responsive Web Design with jQuery