excel columns collection?
I think I figured this out
Dim sht As WorkSheet, i As Integer, col As Variant
Set sht = Sheets("Sheet1")
For i = 1 to sht.Columns("A:J").Count
sht.Columns(i).ColumnWidth = 11.5
Next
'--or
For each col in Sht.Columns("A:J")
Debug.print col.ColumnWidth
Next
-----Original Message-----
Just checking if there is such a collection in excel as a
columns collection. I want to loop through a columns
collection for formatting.
Pseudocode
Dim col As Column, cols As Columns
Set cols = Columns(A:J)
For each col in cols
col.width = 10
Next
Is there a way to do something like this?
Thanks,
Ron
.
|