Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to resize the columns in all sheets of a workbook and I have a
number of workbooks each with a different number of sheets. The code I have so far is: For Each Worksheet In ActiveWorkbook.Worksheets Columns("A:A").EntireColumn.ColumnWidth = 30.71 Columns("B:B").EntireColumn.ColumnWidth = 8.57 Columns("C:C").EntireColumn.ColumnWidth = 8.57 Columns("D:D").EntireColumn.ColumnWidth = 8.57 Columns("E:E").EntireColumn.ColumnWidth = 8.57 Columns("F:F").EntireColumn.ColumnWidth = 8.57 Columns("G:G").EntireColumn.ColumnWidth = 2.14 Columns("H:H").EntireColumn.ColumnWidth = 8.57 Columns("I:I").EntireColumn.ColumnWidth = 8.57 Columns("J:J").EntireColumn.ColumnWidth = 8.57 Columns("K:K").EntireColumn.ColumnWidth = 8.57 Columns("L:L").EntireColumn.ColumnWidth = 8.57 Next Worksheet End Sub It appears to iterate through each worksheet based on display update but only corrects the column widths on the active sheet at the time the code is run. Can anyone advise how I force the code to carry out the instruction on each sheet? Thanks for any help. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
In need to link Columns between sheets of a workbook? | Excel Discussion (Misc queries) | |||
how to resize columns without affecting columns above? | New Users to Excel | |||
How can I resize columns within one row only? | Excel Discussion (Misc queries) | |||
comparing 2 similar columns on seperate work sheets in 1 workbook | Excel Discussion (Misc queries) | |||
Can Columns Resize Automatically??? | Excel Programming |