If In simple terms, a project called the file of any Office application and all related elements of vba, including macros and custom forms. Visual Basic Editor, you can open by pressing the keys 'Alt + F11'. With this combination You can also switch between the editor and the application of which it was called. One hundred to do something in the editor, Visual Basic, first, as a rule, you need to open a module – an element of vba, which contains one or more macros. To open a module, follow these steps: 1. In the Project window, expand the folder Modules (modules).
To do this, click the plus sign (+), which is located to the left of the folder. 2. Double-click on the name of the module you want to open. Object list (list objects). In this list to the left, displays the names of objects available for that element of the project, with whom you work. Modules can not contain objects, so this list includes only the item (General), ie "General".
Procedure list (list procedures). This list is located on the right and contains the names of those procedures and functions that are included in the module. When you select an item from the list in the module editor window displays the selected item. If you have not previously created a macro command Insert => Module (Insert> Module). Visual Basic Editor to set this module the default name such as Module1 or Module2, but it can be renamed at any time.
The easiest way to automate the task – simply record a macro, and vba will do the job for you. This way of creating a macro, we use quite often. Those to me, however, to realize all the possibilities of language vba, have to use some programming tools, ie have to write your own macros. Benefits of creating a macro, based on already recorded: 1. If writing a great macro with a huge amount transactions you make a mistake, you can edit the macro and fix the problem.
You do not want to overwrite the entire macro from the beginning. 2. You'll have full control over each macro. In other words, you make sure that your macros perform exactly those actions that put them to perform. 3. You can use the hidden features of vba to administer the programs of Office, which are available at auto macro recorder. In addition, you can manually write a more professional and efficient routines. To display on-screen editor of Visual Basic, in any Office application, choose Tools => Macro => Editor Visual Basic.
Visual Basic Editor is a separate program that was designed with the sole purpose – to help you in creating and editing macros, vba. (In professional circles, programming the Visual Basic editor is called integrated development environment). When you first open the editor you will not see anything special. The left side of the editor contains two windows, which are called the Project (the Project) and Properties (the Properties). In the Project window displays the contents of the current project vba.