Excel Quick Access Toolbar - Shrink to Fit Button

Anonymous
2016-06-02T10:23:03+00:00

Is it possible to add a "Shrink to Fit" button on my Quick Access Toolbar in Excel (Microsoft Office 365 ProPlus)?  I see just about every feature listed under Customize the Quick Access Toolbar but the "Shrink to Fit" option.  I've even gone through All Commands and just do not see it.  Am I just missing it or is it truly not possible?  I also have Excel for Mac on my personal computer and already have this button on the toolbar but why am I having such difficulties on my work PC?  This is a feature I use quite often and it would be so helpful to have it on the toolbar.  Please help. Thanks!

Microsoft 365 and Office
Microsoft 365 and Office
A comprehensive suite of productivity tools and cloud services that enhance collaboration, communication, and efficiency. Combining classic Office apps with advanced Microsoft 365 features, it supports both personal and business needs

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. Anonymous
    2016-06-02T11:56:58+00:00

    hi alison,

    there is no shrink to fit command available for the quick access toolbar, however, we can do this with a macro, please see the steps below:

    1. open excel and hit alt + f11 to open the vba development window.
    2. click the down arrow next to insert module button > module.

    1. a new module will appear, probably named xxx - modulex (code), paste the following code then close the vba window..

    public sub shrinktofit()

    selection.shrinktofit = true

    end sub

    1. back to excel, right click on the quick access toolbar and select customize the quick access toolbar.

    1. in the choose commands from list, select macros, find modulex.shrinktofit and select it, click the add >> button.

    1. (optional) we can also click modify to change the name shown when we hover over the button, and also to change the icon. click ok, the shrink to fit command is now on our quick access toolbar.

    if you have any other queries regarding excel usability, it's recommended to post in our excel forum for dedicated support as our forum mainly focuses on office 365 for business online services related issues.

    thanks,

    james

    10 people found this answer helpful.
    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Anonymous
    2016-06-02T12:06:34+00:00

    You are spectacular!!!! Thanks so very much!  This was such an easy fix.

    0 comments No comments
  2. Anonymous
    2016-06-02T12:14:38+00:00

    The button worked but then when I went to go use it on another spreadsheet I received this message: "Sorry, we couldn't find C:\Users....\Desktop\Book1.xlsx.  Is it possible it was moved, renamed or deleted?"

    0 comments No comments
  3. Anonymous
    2016-06-03T06:46:12+00:00

    hi alison,

    sorry for not mentioning this point: for macro enabled excel files, we have to enable marcos in file > options > trust center > trust center settings > macro settings as the following screenshot shows.

    if you have not done this before, i suggest you enable it first and then repeat the steps above, also make sure you save the excel file into a .xlsm type.

    note: after you complete the setup, an excel macro-enabled workbook template will be created. please do not edit, move or delete the .xlsm file.

    if you need more assistance about excel usability, we would suggest you post to ourexcel forum, which is dedicated to handing this kind of question.

    regards,

    linda

    1 person found this answer helpful.
    0 comments No comments