How to Create a Button in Excel (to run a macro)

By Srini Vanamala / September 29, 2026 / Macros & VBA
How to Create a Button in Excel (to run a macro)

You need a macro first. New to macros? Write a macro or record one.

1. Shape as a button (easiest, looks best)

  1. Insert › Shapes › pick a rounded rectangle, draw it.
  2. Type the label, e.g. Refresh. Style it with Shape Format.
  3. Right-click › Assign Macro › pick the macro › OK.

Click elsewhere, then click the shape — the macro runs.

2. Form Control button

  1. Show the Developer tab: File › Options › Customize Ribbon › tick Developer.
  2. Developer › Insert › Form Controls › Button.
  3. Draw it. The Assign Macro box opens — pick the macro.
  4. Right-click › Edit Text to rename it.

3. ActiveX button

Developer › Insert › ActiveX › Command Button. More options but less reliable across computers — skip unless you need it.

Save as .xlsm

File › Save As › Excel Macro-Enabled Workbook (*.xlsm). Save as .xlsx and the macro is deleted.

Button does nothing

  • Macros are blocked: enable macros.
  • The macro was renamed: right-click › Assign Macro again.
  • Right-click selects it for editing; left-click runs it.

Keep it in place

Right-click › Format Shape › Properties › Don’t move or size with cells.

Want a clickable jump instead of a macro? link to another sheet

←
Srini Vanamala

20 years with spreadsheets and enterprise systems. Writes one short, plain-English Excel lesson a day. Got an Excel question? learnexceleasycom@gmail.com

Have a question about this lesson?

Ask anything — I read every comment. Your email is never shown.