You can set column width in a macro in Excel by using the ColumnWidth property of the Range object. The following example sets the width of column A to 12 characters.
Range("A:A").ColumnWidth = 12
If you want to set the width of multiple columns, you can use a loop. The following example sets the width of columns A through C to 12, 14, and 16 characters, respectively.
For i = 1 To 3
Columns(i).ColumnWidth = i * 2 + 10