Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Create a Shape Outline Button in Excel

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Creating a shape outline button in Excel lets you build interactive, visually distinct triggers for macros or navigation—without using the default Form Controls. This approach uses a standard shape (like a rectangle) formatted to look like a button, then assigns a macro or action to it. You only need Excel installed (any modern version: 2016, 2019, 2021, Microsoft 365) and basic familiarity with the ribbon interface.

What You'll Need

  • Microsoft Excel (2016 or later; works on Windows, Mac, and web versions)
  • A worksheet where you want the button to appear
  • Optionally, a macro to assign to the button (if you want it to run code)

Step-by-Step

  1. Open your Excel workbook and navigate to the worksheet where you want the button.
  2. Go to the Insert tab on the ribbon at the top of the window.
  3. Click Shapes in the Illustrations group—this opens a dropdown menu of geometric shapes.
  4. Select a rectangle shape (under the Rectangles section). The cursor changes to a plus sign; click and drag on the worksheet to draw the button to your desired size. Hold Shift while dragging to keep it perfectly square or maintain aspect ratio if desired.
  5. Format the shape as a button:
    • Right-click the shape and choose Format Shape (or click the Format tab that appears after selecting the shape).
    • Under Fill, select Solid fill and pick a color like light gray, blue, or white—avoid dark colors for readability.
    • Under Line (or Outline), choose a solid line color (e.g., dark gray or black), set width to 1.5–2.25 pt for a crisp border, and ensure No fill is *not* selected for the fill.
    • Optionally, under Effects > Shadow, apply a subtle Outer or Perspective shadow to give it a raised, clickable appearance.
  6. Add text to the button:
    • Click once on the shape to select it, then click again to place the cursor inside—type your label (e.g., "Submit", "Clear Form", "Run Report").
    • With the text still selected, use the Home tab to center-align it, increase font size (e.g., 10–12 pt), and choose a contrasting color (e.g., dark blue or black on a light background).
  7. Assign a macro (optional but common):
    • Right-click the shape and select Assign Macro.
    • In the dialog box, choose an existing macro from the list (if you’ve already created one in VBA), or click New to open the VBA editor and write a simple macro (e.g., Sub SubmitButton_Click()).
    • Click OK to confirm. If you created a new macro, Excel opens the Visual Basic editor—add your code between the Sub and End Sub lines, then close it.
  8. Test the button:
    • Click outside the shape to deselect it, then click the button directly—ensure it responds as expected (e.g., runs the macro or triggers an action).
    • If no macro is assigned, the button remains static but still functions visually as a label.

Common Mistakes

  • Over-formatting the shape—too many gradients, 3D effects, or bright colors can make the button look cluttered or hard to read. Stick to clean, subtle styling.
  • Forgetting to assign the macro—drawing the shape isn’t enough; if you need it to run code, you must manually assign a macro via right-click > Assign Macro.
  • Misaligned text—text may appear off-center if the shape isn’t sized evenly or if the text box isn’t centered. Use the Home tab’s alignment buttons to fix this.
  • Placing the button in a filtered or protected range—if your sheet is protected, the button may not work unless you enable "Edit Objects" in Review > Protect Sheet options.

Tips

  • Group shapes for consistency—if you create multiple buttons, draw the first, format it, then copy/paste it and change only the text. This ensures uniform size and style.
  • Use AutoFit for dynamic text—right-click the shape > Size & Properties > Properties > choose "Move and size with cells" if you want the button to adjust when rows/columns resize.
  • Hide the button when not needed—right-click and choose Hide (or set Fill > No Fill and Line > No Line) to temporarily remove it without deleting.
  • Use keyboard shortcuts for speed—press Alt + N + S to open the Shapes menu directly; then use arrow keys to position the shape precisely.

Troubleshooting

If your shape outline button isn’t working as expected, follow these checks:

  • Button doesn’t respond to clicks
    • Ensure the sheet isn’t protected. Go to Review > Unprotect Sheet (enter password if set).
    • Verify a macro is assigned: right-click the shape > Assign Macro > confirm a macro appears and is selected.
    • Check if the macro itself has errors—open the VBA editor (Alt + F11), then run the macro directly from the editor to test.
  • Text or formatting disappears after editing
    • Click the shape once to select it (not edit), then use Format Shape to reapply fill/line settings.
    • Ensure you’re not accidentally clicking off the shape when editing text—always finish editing by clicking outside the text box, not on the shape itself.
  • Button moves unexpectedly
    • Right-click the shape > Size & Properties > Properties > choose "Don’t move or size with cells" if you want it fixed in place.
    • Lock the shape: Format Shape > Size & Properties > Properties > uncheck "Lock anchor" (if available) or ensure Protect Sheet doesn’t restrict movement.
  • Shape appears invisible or unformatted
    • Check if Fill is set to "No fill"—go to Format Shape > Fill and select a solid color.
    • Verify the line color isn’t set to "No line" under Line > Line Color.
    • Zoom in (Ctrl + Scroll) to confirm the shape is there; sometimes it’s just too small or off-screen.

Frequently Asked Questions

Can I link a shape button to a cell or URL instead of a macro?

Yes. Right-click the shape > Hyperlink > choose "Existing File or Web Page", then enter a URL or select a cell reference (via "Place in This Document"). The button will open the link when clicked.

Does this work on Mac Excel?

Yes—the process is nearly identical on Excel for Mac (2016 or later). The Insert tab, Shapes menu, and Format Shape options are present, though minor labeling differences may occur (e.g., "Format Shape" might be "Format Shape..." with ellipsis).

Why does my button text look blurry or pixelated?

This usually happens if the shape is scaled disproportionately. Right-click the shape > Size & Properties > uncheck "Lock aspect ratio", then manually set Width and Height to equal values (e.g., 100 pt × 100 pt) for crisp text rendering.

Can I use this button in Excel Online (web version)?

Yes, but with limitations. You can create the shape and add text, but assigning macros isn’t supported in Excel Online—macros require the desktop app. Hyperlinks assigned to the shape will work in the web version.

How do I make the button look like it’s pressed when clicked?

Excel doesn’t support dynamic hover/click states natively. As a workaround, create two versions of the button (one "normal", one "pressed" style), hide the pressed one by default, and use a macro to toggle visibility on click—but this requires VBA and isn’t seamless.

What if I accidentally delete the button?

Press Ctrl + Z immediately to undo. If closed the file, check the Recycle Bin for backups, or restore from OneDrive/SharePoint version history if cloud-synced. Prevention: use copy/paste to duplicate important buttons before modifying them.