简体   繁体   中英

Excel Macro Button

Is there a way to create a button in Excel to trigger a Macro. So say I have a button that says "Start" that I can click to start a Macro instead of using a hotkey.

If you use the 'Forms' toolbar, you will be able to draw a button and assign a macro to it. See here for details.

Go into the VBA IDE (by clicking to edit your macro or similar). On the left hand side, right click your project, do Insert , User Form . Drag a command button over from the tools, double click it to generate an event handler.

Fill in the code and run the macro to display the form.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM