You select a module to view its code, copy modules to other open workbooks, and delete modules.ĭisplays the Visual Basic code for the selected module in a project.ĭisplays specific characteristics of an object, such as the name of the object, or the standard width of the columns.ĭisplays the basic tools needed to use the Visual Basic Editor.Ĭontains a drop-down list from which to select the desired object whose code you want to view in the Code window. Each project can contain folders for objects (such as the worksheets in the workbook), forms, references, and modules. Beginner, Intermediate and Advanced Excel classes are also available.įigure 2-6: The Visual Basic Editor ElementĬontains projects that store the Visual Basic code for each open workbook. Our classes are hands-on and instructor-led. Editing Visual Basic code is similar to editing text in a word processing program.įor more details of Macro and VBA Excel training in Los Angeles call us on 888.815.0604. Double-clicking a module in Project Explorer displays the module’s code in the Code window. The code for a macro is stored in a module, which is simply a holding place for the code, just as a worksheet is a holding place for data in cells. Navigating the Project Explorer is similar to navigating Windows Explorer, in that they both have hierarchical structures. Since you won’t need the Properties window while performing simple editing, you can close the Properties window, and then expand the Project Explorer to view more of its window.Įach open workbook in Excel has a project associated with it in the Project Explorer. The Project Explorer, Properties window, and Code window all appear when you open the Visual Basic Editor. The elements of the Visual Basic Editor are described in the table below. You edit a macro in the Visual Basic Editor, shown in Figure 2-6. You may have quite a few macros in a file, so you’ll want to give it a descriptive name to easily identify what it does.If you need to make simple changes to a macro, such as inserting text or deleting a command, such as a specific format applied to a cell, you can edit the macro. The name must start with a letter and can’t have any spaces, symbols, or punctuation marks. The Record Macro window opens, where you can set up the macro’s name, description, and shortcut keys before you record it. If necessary, turn on the Developer tab.If you do make a mistake while recording a macro, don’t worry-you can always delete the existing macro and try again or edit the macro’s Visual Basic source code to fix the mistake. Practice or rehearse your script a couple times, to make sure it works, before you actually record it. Before recording a macro, it’s helpful to write down a script that contains all the steps you want the macro to record. When you create a macro, imagine you’re being recorded every step you make is being tracked-all your commands, the data you enter, even any mistakes you make. This lesson explains the easy way to create a macro-by recording the task(s) you want the macro to execute for you. There are two ways to create a macro: by recording them or by writing them in Excel’s Visual Basic programming language.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |