Darren Bartrup
Well-known Member
- Joined
- Mar 13, 2006
- Messages
- 1,296
- Office Version
- 365
- Platform
- Windows
Morning all.
Hopefully a nice easy one to start the day off with.
Is there an easier way to write this:
I'm kinda hoping I can write something like:
But I can't find the right syntax
Please help before I go crazy!!
Ta.
Hopefully a nice easy one to start the day off with.
Is there an easier way to write this:
Code:
With rptWrkSht
.Columns(1).ColumnWidth = 8.13
.Columns(2).ColumnWidth = 18.25
.Columns(3).ColumnWidth = 8
.Columns(4).ColumnWidth = 12.63
.Columns(5).ColumnWidth = 11.5
.Columns(6).ColumnWidth = 12.38
.Columns(7).ColumnWidth = 12.38
.Columns(8).ColumnWidth = 9.75
.Columns(9).ColumnWidth = 7.5
.Columns(10).ColumnWidth = 13.13
.Columns(11).ColumnWidth = 8.88
.Columns(12).ColumnWidth = 10.63
.Columns(13).ColumnWidth = 7.25
.Columns(14).ColumnWidth = 18.38
End With
I'm kinda hoping I can write something like:
Code:
rptWrkSht.Columns(1:14).ColumnWidth = array(8.13,18.25,8,.....)
Please help before I go crazy!!
Ta.