Assigning VBScript Macros to Toolbar Buttons or Key Sequences
Home Page (Macros)  |  Overview  |  How Do I Topics  |  FAQ  |  Reference
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
- 
On the Tools menu, click Customize.
 
 
- 
Click the Commands tab.
 
 
- 
In the Category box, click Macros.
 
 
- 
From the Commands box, drag the macro's name to the toolbar where you want a button for the macro.
 
 
- 
In the Button Appearance 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
- 
On the Tools menu, click Customize.
 
 
- 
Click the Keyboard tab.
 
 
- 
In the Category box, click Macros.
 
 
- 
In the Commands box, select the macro you want to assign.
 
 
- 
Click in the Press new shortcut key box.
 
 
- 
Press the key sequence you want to use for the macro.
 
 
- 
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++.