In Feb 2008, shg posted this code to help a forum user. It is close to what I want, but I cannot get the correct modification. I want to change the column width to a number that is found in cell A1 in another worksheet. I have tried [3. Columns("C").ColumnWidth=Sheet2!A1 without success.
Any suggestions?
Thanks. Mike
Code
- Sub SetColumnWidth()
- Columns("A:B").ColumnWidth = 3.14
- Columns("C").ColumnWidth = 8
- Columns("D").ColumnWidth = 13.57
- Columns("E").ColumnWidth = 24.14
- Columns("F").ColumnWidth = 9
- Columns("G").ColumnWidth = 10
- Columns("H").ColumnWidth = 11.29
- Columns("I").ColumnWidth = 8.57
- Columns("J").ColumnWidth = 6.86
- Columns("K").ColumnWidth = 8
- Columns("L").ColumnWidth = 13
- Columns("M").ColumnWidth = 10
- End Sub