Share via


Assigning VBScript Macros to Toolbar Buttons or Key Sequences

Home Page (Macros)OverviewHow Do I TopicsFAQReference

If you assign a macro to a toolbar button or key sequence, you can run the macro by clicking the button or pressing the assigned keys.

To assign a macro to a toolbar button

  1. On the Tools menu, click Customize.

  2. Click the Commands tab.

  3. In the Category box, click Macros.

  4. From the Commands box, drag the macro's name to the toolbar where you want a button for the macro.

  5. In the ButtonAppearance dialog box, select an image for the toolbar button, and then click OK.

    Visual C++ adds a button with that image to the toolbar.

To assign a macro to a key sequence

  1. On the Tools menu, click Customize.

  2. Click the Keyboard tab.

  3. In the Category box, click Macros.

  4. In the Commands box, select the macro you want to assign.

  5. Click in the Press new shortcut key box.

  6. Press the key sequence you want to use for the macro.

  7. Click the Assign button.

    Visual C++ assigns that key sequence to the macro.

Visual C++ provides other ways of using toolbar buttons and key sequences to customize your desktop environment. For details, see Customizing Visual C++.