Auto setting column widths accross a whole workbook
Hi Vmaster
Try ou this
Sub AutoFitColumns()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Columns.AutoFit
Next
End Sub
"vMaster" wrote:
I was trying to write a macro to select all columns on all sheets in
the workbook and force the columns to fit to the data. However, even
using a tip here to select all the sheets, I could only get it to apply
automatic widths to the current sheet.
Is it possible to write a macro to do this?
Any help apreciated. Excel 2003.
|