VBA & Macro Problems

Fix Excel Column Width Reverting After Reopening a Workbook

Tauseeq MagsiTauseeq Magsi Nov 13, 2026 870 views

Question details

The user needs an Excel column to retain a specified width after reopening a workbook.

Fix Excel Column Width Reverting After Reopening a Workbook
Product
Microsoft Excel
Device & OS
not provided
Scenario
A workbook is reopened after a column width has been set.
Observed behavior
The column width may revert to the default value of 8.43 when the workbook opens.
Before you start

Open the workbook in desktop Excel and identify the affected sheet and column. Make sure you trust the workbook before inspecting or enabling its macros.

Solution 1Recommended

Check VBA code and set the column width when the workbook opens

Use this approach when workbook code or another macro may be resetting the column width on opening.

1
Open the VBA editor

In Excel, select Developer > Visual Basic, then locate the workbook in the Project Explorer.

2
Check for width-resetting code

In the VBA editor, use Edit > Find to search the current project for ColumnWidth. Review any matching workbook events or macros that change the affected column, and correct or remove unwanted resets.

3
Add the opening event

In Project Explorer, double-click ThisWorkbook and add the following procedure: Private Sub Workbook_Open() Worksheets("Sheet1").Columns("C").ColumnWidth = 25 End Sub. Replace Sheet1, C, and 25 with your sheet name, column, and desired width. If a Workbook_Open procedure already exists, add only the Worksheets line inside it rather than creating a second procedure.

4
Save and test

Choose File > Save As and select Excel Macro-Enabled Workbook (*.xlsm). Close and reopen the file, enable macros if prompted and you trust the workbook, then check the column width.

Check VBA code and set the column width when the workbook opens
Check for other changes: A conflicting macro, add-in, or template may still change the width. If the width resets again, review other code that runs when the workbook opens or the sheet is activated.
Free Microsoft Office alternative

Adjust spreadsheet column widths in WPS Office

WPS Office is a free, lightweight alternative for everyday spreadsheet editing. Its familiar interface and support for Excel formats make it easy to move existing files to WPS Spreadsheets. It does not fix Excel's VBA events, so check macro compatibility before relying on workbook automation.

Adjust column widths in a familiar spreadsheet interfaceOpen and edit Microsoft Excel XLSX and XLS filesUse a free, lightweight office suite for everyday workMove existing spreadsheets into a familiar editing environment
microsoft office alternative - wps office

Frequently Asked Questions

Why does my Excel column width return to 8.43?

A workbook event, another macro, an add-in, or a template may be resetting it. Open Developer > Visual Basic and search the VBA project for ColumnWidth to check workbook code.

Where should I put the Workbook_Open procedure?

In the VBA editor's Project Explorer, open ThisWorkbook and place the procedure there. If Workbook_Open already exists, add the column-width statement inside the existing procedure.

Why does the width-setting macro not run when I reopen the file?

Confirm that the file is saved as an Excel Macro-Enabled Workbook (*.xlsm), that the code is in ThisWorkbook, and that macros are enabled for the trusted file when prompted.

Can I set a different column or worksheet width?

Yes. In the Worksheets("Sheet1").Columns("C").ColumnWidth = 25 statement, replace Sheet1 with the worksheet name, C with the column letter, and 25 with the width you want.