by Allen Wyatt
(last updated November 20, 2017)
Gary uses a lot of buttons to trigger macros in his workbooks, and for some reason they move all over the place and resize themselves. He wonders why this happens and how he can stop it. He wants the buttons to stay the size he chooses, in the place he specifies.
Believe it or not, Excel allows those buttons to move and resize by default. If you don't want them to behave in that way, then you need to take steps to nail them down. If your buttons are actually form control buttons or ActiveX command buttons, then you simply need to right-click on the button and choose Format Control from the resulting Context menu. Excel displays the Format Control dialog box, on which you should select the Properties tab. (See Figure 1.)
Figure 1. The Properties tab of the Format Control dialog box.
Just click the radio button that reflects the behavior you want for the control—in most cases you'll click Don't More or Size with Cells.
If the buttons you are using are actually shapes, clip art, or a text box that you've assigned macros to, you can follow the same general steps. Right-click the object and choose Format Shape (or, if it is available, Size and Properties) from the Context menu. Excel 2007 and Excel 2010 display the Format Shape dialog box, while Excel 2013 displays the Format Shape task pane.
Set the movement and resizing radio buttons to, again, reflect the behavior you want for your object.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (7009) applies to Microsoft Excel 2007, 2010, and 2013.
Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!
As your macro is processing information, there will doubtless be times that it will need to compare information in ...Discover More
One of the things you can do with macros is to work with disk files. As you do so, you may have a need to create a new ...Discover More
Macros are often used to process the data stored in a worksheet. Some of these processing needs can be pretty specific to ...Discover More
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.