Launch VBA code macro from a GO or RUN button

To add a GO or RUN button to an Excel sheet to start a VBA macro/subroutine…

Decide where on the sheet to place the button. I’ll make some room along the top the row…

Add 'GO' or 'RUN' button to start Excel VBA macro
Add ‘GO’ or ‘RUN’ button to start Excel VBA macro

Click the Insert tab > Illustrations section > Shapes, and choose a shape…

Insert shape onto Excel sheet
Insert shape onto Excel sheet

Position the shape where and how you want it…

Position shape on Excel sheet
Position shape on Excel sheet

Right-click the shape and click Edit text. Enter GO, RUN, START, or whatever you want the button to say…”

Right-click shape and 'Edit text'
Right-click shape and ‘Edit text’

Right-click the shape and click Assign Macro…, then choose which macro will start when the shape is clicked…

Right-click and 'assign macro' to the shape
Right-click and ‘assign macro’ to the shape

Choose the macro and click OK
Choose the macro and click OK

That’s it — just click the shape whenever you want to start your macro or chain of macros…

Click shape to run your VBA macro/subroutine
Click shape to run your VBA macro/subroutine

To download ths Excel VBA project: getelementsbytagname2.xlsm

Facebooktwittergoogle_plusredditlinkedintumblrFacebooktwittergoogle_plusredditlinkedintumblr