Fix Excel Column Width Reverting After Reopening a Workbook
Question details
The user needs an Excel column to retain a specified width 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.
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.
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.
In Excel, select Developer > Visual Basic, then locate the workbook in the Project Explorer.
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.
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.
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.

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.

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.




