Assume there were 8 columns. s is array of 8 width.
PHP Code:
Option Explicit
Sub test()
Dim s, i&
s = Array(20, 8, 10, 11, 12, 13, 14, 15) ' assume there were 8 widths of 8 columns
For i = 0 To UBound(s) - 1
Cells(1, i + 1).ColumnWidth = s(i)
Next
End Sub
Bookmarks