Свързани теми
×
Work with macros
Преминаване към основното съдържание
Поддръжка
Влизане с Microsoft
Влезте или създайте акаунт.
Здравейте,
Изберете друг акаунт.
Имате няколко акаунта
Изберете акаунта, с който искате да влезете.
Английски
Съжаляваме. Тази статия не е налична на вашия език.
Work with macros

Edit a macro

Your browser does not support video. Install Microsoft Silverlight, Adobe Flash Player, or Internet Explorer 9.

Watch this video to see how to edit a macro in a special text editor called the Visual Basic Editor. Visual Basic is the programming language that macros are recorded in.

First, show the Developer tab

The DEVELOPER tab, on the ribbon, is where all of the macro commands are.

  • To have it appear on the ribbon, click FILE > Options > Customize Ribbon, check Developer, and click OK.

  • On the DEVELOPER tab, in the Code group, are the Record Macro button and some other buttons that will come in handy.

Create a macro using Visual Basic

  1. Click DEVELOPER > Visual Basic.

  2. If needed, in the Visual Basic Editor, on the Insert menu, click Module.

    Note:  Modules are automatically created for all sheets in the workbook.

  3. In the code window of the module, type or copy the macro code that you want to use.

  4. To run the macro from the module window, press F5.

  5. In the Visual Basic Editor, on the File menu, click Close and Return to Microsoft Excel when you finish writing the macro.

Edit the macro

  1. On the DEVELOPER tab, in the Code group, click Macros.

  2. In the Macro name box, click the macro that you want to edit.

  3. Click Edit. The Visual Basic Editor appears.

Want more?

Create or delete a macro

Edit a macro

Assign a macro to a button

Create and save all your macros in a single workbook

Нуждаете ли се от още помощ?

Искате ли още опции?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Беше ли полезна тази информация?

Какво е повлияло на вашия потребителски опит?
Като натиснете „Подаване“, вашата обратна връзка ще се използва за подобряване на продуктите и услугите на Microsoft. Вашият ИТ администратор ще може да събира тези данни. Декларация за поверителност.

Благодарим ви за обратната връзка!

×