Public Sub ColWidth()
Dim i As Long
For i = 1 To 256
Cells(1, i).Value = Columns(i).ColumnWidth
Next i
End Sub
Sub InsertColumnWidths()
Dim LstCol As Long
Dim my As Range
Dim c As Range
LstCol = Cells(1, Columns.Count).End(xlToLeft).Column
Range("1:1").Insert xlDown
Set my = Cells(1, 1).Resize(, LstCol)
For Each c In my
c.Value = c.Width
Next c
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim cell As Range
For Each cell In Range(Cells(1, 1), Cells(1, Columns.Count))
cell.Value = cell.Width
Next cell
End Sub
[COLOR="Navy"]Sub[/COLOR] MG28Oct05
[COLOR="Navy"]Dim[/COLOR] Col [COLOR="Navy"]As[/COLOR] Range, Txt [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]String[/COLOR]
[COLOR="Navy"]For[/COLOR] [COLOR="Navy"]Each[/COLOR] Col [COLOR="Navy"]In[/COLOR] ActiveSheet.UsedRange.Columns
Txt = Txt & Col.Column & ";- " & Col.Width & Chr(10)
[COLOR="Navy"]Next[/COLOR] Col
MsgBox "Col Num." & "Col Width" & Chr(10) & Txt
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]
Sub ColumnWidth()
Dim i As Long
i = 1
Range("1:1").Insert shift:=xlDown
Do
Cells(1, i).Value = Cells(2, i).Width
i = i + 1
Loop Until IsEmpty(Cells(2, i))
End Sub