Excel VBA - StandardWidth property

Posted on 2014-07-21
Last Modified: 2014-07-23
I have about 14 columns which have been modified to different sizes.  I would like to bring them all back to the standard width as defined in the properties window.  What is the VBA code to do this?
Question by:brothertruffle880
    LVL 13

    Assisted Solution

    Try this as follow


    Sub test()
    ActiveSheet.Columns.EntireColumn.ColumnWidth = ActiveSheet.StandardWidth
    End Sub

    Open in new window

    LVL 85

    Accepted Solution

    You can also use:
    Range("A:N").UseStandardWidth = True

    Open in new window

    for specific columns for example.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    Sparklines have been introduced with Excel 2010 and are a useful tool for creating small in-cell charts, used for example in dashboards. Excel 2010 offers three different types of Sparklines: Line, Column and Win/Loss. What it does not offer is a…
    Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
    This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
    This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now