Sub ColumnWidths()
Dim targ As Range, cel As Range
On Error Resume Next
Set targ = Application.InputBox("Please select the range you want to report columns widths for", Type:=8)
On Error GoTo 0
If targ Is Nothing Then Exit Sub
Application.ScreenUpdating = False
Set targ = targ.Rows(1)
With Worksheets.Add(after:=Worksheets(Worksheets.Count))
For Each cel In targ.Cells
.Cells(1, cel.Column) = cel.EntireColumn.ColumnWidth
Next
End With
Application.ScreenUpdating = True
End Sub
|