How the microsoft excel program starts. Starting and shutting down Excel. Running a macro using hotkeys

This article will give you a step-by-step example with pictures and a fragment of the simplest ready-made VBA code.

How to execute VBA macro in Excel

For example, the easiest way to run a macro to understand, but difficult to implement:


The program is a macro to execute its function.

Now we can move from simple to even simpler) After all, running macros in this way is very inconvenient. Next, we will consider simpler options.

Useful advice! If you want to edit a macro, then select it in the list of the above described tool and click on the "Login" button, and do not use the "Edit" button. Using the enter button, you can always go to the source code of the selected macro. The editor will open automatically Visual basic exactly in the place where the code of this macro is written. Unfortunately, the "Edit" button does not work the same for all macros.

Attention! Macros created in Excel add-ins may not be available by default in the Macro dialog box for security policy purposes. After all, the names of macros in Excel add-ins are usually hidden from third-party users. But if you enter the correct value in the "Macro name:" field, then all buttons in the dialog box will be active. This means that we are ready to work with this macro from the add-in and the user is the author of the add-in or a trustee.



Running a macro using hotkeys

For each macro in Excel, you can assign your own keyboard shortcut. Thanks to this, you can call your macro program when you press a certain key combination on the keyboard. What could be simpler than it?

To assign your own keyboard shortcut for a specific macro, you should do this:

Now press your hotkey combination to invoke the selected macro. As you can see, your macro has now been assigned a hotkey combination for shortcuts.

Note! A field for entering its description is available in the "Macro Parameters" dialog box. This description will be available below when choosing a macro from the list. We recommend that you always sign your macros. This custom tone of Excel ethics will be highly appreciated when dozens of macros are added to the list.

Useful advice! Try not to use popular keyboard shortcuts for working with Excel: CTRL + S; CTRL + A; CTRL + T; CTRL + C; CTRL + V; CTRL + SHIFT + L etc. After all, then their purpose will be changed. In the "Macro parameters" window it is also possible to use the SHIFT key in key combinations. As soon as you give the keyboard focus to the input field "Keyboard shortcut: CTRL +" and try to enter a capital letter for the combination, of course using the SHIFT key on the keyboard, the name of the input field will immediately change to "Keyboard shortcut: CTRL + SHIFT +".

As a result, there will be a slightly longer combination, which will allow you to expand the options to bypass frequently used hotkeys.

How to run a macro on the Quick Access Toolbar

Excel allows users to run macros using the panel quick access to the tools. This panel is located at the very top of the program window by default.

To run a macro using the Quick Access Toolbar, you need to do the following:


There is now another button on the Quick Access Toolbar for. It is enough to click on it and the macro will start immediately.

Useful advice! To change the appearance of a button for a macro in the "Excel Options" - "Quick Access Toolbar" window, select the macro from the right-hand list of items "Customize the Quick Access Toolbar" and click the "Change" button. A small gallery of icons for the new design will be offered appearance Macro launch buttons from the toolbar.


The main disadvantage of placing a button with a macro on the toolbar is that the button will always be available to other files, even when the file with this macro is closed. And if in such cases you click on the macro start button, then the file where it is located will open and only then the VBA code will be executed.

Running a macro using a button on an Excel worksheet

If you only want to run a macro from an Excel workbook, where does it contain its source code? In such cases, creating a button on Excel worksheet and assign it to run a specific macro. For this:

After creating a button, you can customize it by changing its size and position on the sheet. To do this, click again right click mouse on the button, and then press the Esc key on the keyboard to hide context menu... The button has handles that can be used to change its size. Move the mouse cursor over any marker on the edges or corners of the button and hold down the left mouse button and drag, thus changing its size. Now click on the button with the left mouse button and while holding it move the button along the sheet Excel document to any other place. To commit all changes to the button, left-click in any area of ​​the sheet (for example, on any cell) outside the button area.

Now if we click on the button with the left mouse button, the VBA code assigned to it will be immediately executed.

The basic principles for creating, loading, and saving Excel documents are similar to those for Word documents.

You can start Excel from the Main windows menu using the command START - Programs - Microsoft Excel. Also, the launch of the program can be carried out by any of standard ways launching applications, including double click mouse over the document icon associated with Excel. When you start Excel without specifying a file name, the processor by default prompts you to start creating a new document with a conventional name Book1.

Excel document templates have the standard * .xlt extension. If the template name is not specified in the startup directory, then new document Excel (workbook) is created with default options.

By default, Excel 2000 saves workbooks in the Excel 2000 format, which is identical to the format Excel files 97, but different from formats previous versions... Some properties specific to Excel 97 are lost when you open and save an Excel 2000 workbook in Excel 97 Excel versions 2000. Excel 2000 provides the ability to save a workbook in a special double format(Microsoft Excel 97 - 2000 & 5.0 / 95). In this case, the book is saved in one file, which includes the format

Excel 2000 without losing any of the features specific to that version.

Completion Excel work like any other Windows applications, is the closing of its window.

Program window

The general view of the Excel 2000 window is shown in the figure. The Excel window contains all the standard elements inherent in the Windows application window (Fig. 1).

fig. 1

Title bar contains the name of the application, the name of the open document, the system menu button, standard window control buttons.

In the Excel window, as in the window of any other Windows application, there are vertical and horizontal scroll bars.

Menu bar Excel window differs from the Word menu bar by the appearance of only one item Data instead of paragraph Table. Team DATA is intended for manipulating the contents of table cells (for example, sorting, filtering, consolidating data, etc.).

Toolbars Excel 2000 windows Standard and Formatting are displayed by default on one line in an abbreviated form and contain the most important buttons of similar panels in Word. In Excel 2000 using the button Cancel you can undo the last 16 operations.

Fig. 2

Below the toolbar in the Excel window is Formula bar,(fig. 2)

which serves to enter and edit data in cells and contains:

1. Name field- drop-down list, which displays the address or name of the active cell or block of table cells.

2. A string field for entering and editing data, intended for viewing and editing text data. Feature of the line (field)

input and editing is that it:

Yo fully displays the content of the active cell, which is sometimes not visible in the cell itself;

Ё makes it possible to see the formula or function contained in the current cell, and not her result, displayed in the cell itself;

3. Between these fields during data entry, three buttons appear to control the entry process:

Ё Change the formula - [=],

Ё Entry certification - [v],

Ё Cancel input - [x]

Working field(sheet) (Fig. 3) of the Excel program window consists of cells, column and row names. At the top of the worksheet is a row of table column headings.


rice. 3

On the left are the row numbers of the table. At their intersection there is an "empty" gray button, which serves to select the entire worksheet.

Below the entire working field is a line with labels (names) of worksheets available in the book. To the left of the tabs are buttons for navigating the worksheets of the document, and to the right is a horizontal scroll bar.

At the very bottom of the Excel window is the tabular processor status line (prompt line). It is designed to issue messages to the user regarding his possible actions in this moment... The status line may contain a status indicator of the spreadsheet processor, which reflects its mode of operation (Done, Enter, Edit, Record a macro), an explanation of the current menu command, a hint about the purpose of the button being used. In addition, the status bar contains a field for automatic calculations, which is used to quickly calculate and view intermediate results. Excel is a reusable program, i.e. allows you to open multiple documents at the same time. Move between windows open documents can be done by clicking on the document icon on the Taskbar or from the Window menu. Arrange arrangement open windows Excel documents can be done using the command WINDOW - Arrange. An Excel document window can be divided into two or four sub-windows and simultaneously work with different parts of the same table. You can split windows using the WINDOW - Split command, or using window dividers - black rectangles on the scroll bars. The window can be closed by the menu command WINDOW - Unblock

If the software package is already installed on your computer Microsoft Office 2013, you can immediately launch Microsoft Excel 2013 and start exploring it in depth. If you are just going to install it, refer to the installation article. The process is described in detail there. Microsoft installations Office 2013. In this article, we will look at how to start Microsoft Excel 2013 and the basic issues related to document creation.

If you have a Windows 8 operating system installed on your computer, to run Microsoft Excel 2013 you need to home screen use the scroll bar to move to the right (to see tiles that do not fit on the screen) and click on the Excel icon (it is green). An example of the location of this icon on the home screen is shown in Fig. 1.1.

If you are using an operating room Windows system 7, click the button Start, in the menu that appears - on the Microsoft Office 2013 folder, and then in the drop-down list - on the Excel 2013 item (Fig. 1.2). As a result of these actions, the starting Microsoft window Excel (fig. 1.3).

Here you need to immediately make it clear that the document you are working with in Microsoft Excel is called a workbook. The start window allows you to select the book you worked with before from the list on the left side of the window, or create a new book. Moreover, you can create an empty book, or you can create a book based on a template. Sample- this is a book blank with pre-made inscriptions and other elements. Templates help you quickly create documents of the same type. If this is your first time creating a book, click the Blank Book item, as shown in Fig. 1.3.

A window with an inscription in the title will open Book1- Excel and clean slate with a grid separating cells in the working area of ​​the window. You can get to work.