I feel really stupid. I can't set the column width.
The following code /should/ shrink the page widths by a factor of two, roughly. Instead, it stops with an error on the col.Width line:
Object required.
What INCREDIBLY OBVIOUS thing am I missing?![]()
Sub ShrinkOnce() Dim sht As Worksheet Dim col As Range For Each sht In ActiveWorkbook.Worksheets For Each col In sht.Columns col.Width = 48# ' = col.Width / 2 Next col Next sht End Sub
Bookmarks