Determine a cell's width and enter it in the cell
As an alternative: you could "group" all the sheets in a workbook by
pressing CTRL and left clicking each tab. When sheets are grouped any
change made to one sheet will be made on all the grouped sheets. Then
autosize each column- all columns will now be a readable width.
Ungroup your sheets afterwards by right-clicking on a grouped sheet and
selecting Ungroup Sheets. You could even automate this process by
recording it as a macro.
Since you're using code you can get a column's width with this code:
dim ColWidth as double
ColWidth = ActiveCell.Width
|