Second, the window function introduction

2. Training Project 1.2: Familiar with the programming environment of VBA - VBE

Purpose of training: Familiarize yourself with the VBA programming environment

Training content: Start Excel, switch to the VBE window, and be familiar with the main window: menu bar, toolbar, project resource manager, code window, property window, and immediate window.

Homework: CSDN publishes the function introduction blog of each window.

2.1 Opening the VBE window

1. Open the Excel application, click "Development Tools" → "Visual Basic" to open the window, as shown below:



2.2 The composition of the window is as follows:

1. The VBE window mainly includes menu bar, toolbar, project resource manager, code window, property window, immediate window, monitoring window, etc.

2. Introduction to the functions of each window

  • Menu bar: It is the most important component of the VBE window, including 11 menu items such as File, Edit, View, Insert, Format, Debug, Run, Tools, External Window, Window, and Help. You can use these menu items to complete almost everything in the editor. function.
  • Toolbar: Provides commonly used command buttons, which can help us edit, debug and manage programs more efficiently and conveniently. In addition to the common buttons displayed by default, we can also display toolbars such as editing and debugging by selecting "View" → "Toolbar" in the menu bar.
  • Project Explorer: Here, we can easily manage the modules, class modules and forms in the project, and can also switch between codes and objects in a large capacity.
  • Properties window: Lists all properties of the selected object in the Project Explorer and their values. The user can query and modify the value of the property.
  • Code window: It is the essential and most commonly used window in VBE. When the user double-clicks an object in the project resource manager, the corresponding code window will be opened automatically, and the user can edit and debug the code in it. Each object in the Project Explorer corresponds to a code window. When multiple code windows are open at the same time, only one is in the backward state.
  •   There are two main functions of the immediate window: execute single-sentence code; display the results output by using the statements Debug and Print.
  • The watch window is used to observe the changes of objects and variables in break mode during code debugging.


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325734749&siteId=291194637
Recommended