ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Can we write VBA code to set all column/row's size back to default size? (https://www.excelbanter.com/excel-programming/271060-re-can-we-write-vba-code-set-all-column-rows-size-back-default-size.html)

Charles Williams

Can we write VBA code to set all column/row's size back to default size?
 
You can use the worksheet standaheight and standardwidth properties

ActiveSheet.Rows.EntireRow.RowHeight = ActiveSheet.StandardHeight
ActiveSheet.Columns.EntireColumn.ColumnWidth = ActiveSheet.StandardWidth

hth
Charles
______________________
Decision Models
The Excel Calculation Site
www.DecisionModels.com

"d" wrote in message
...
VBA code changes the Excel column/row size, Can we write
VBA code to set all column/row's size back to default size?

Thanks in advance!





All times are GMT +1. The time now is 11:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com