O
owlnevada
I have files that originated with the last four versions of Excel with
Windows XP and created on different screens and resolutions. Sometimes when
I run certain macros that set a default width or row height on all the used
cells, the view comes back distorted in one dimension. Rerunning the macro
doesn't reset it and once changed after running the macros, I've not run
across a way to fix it to my standard template values. Not sure, but it seems
like it must have somethng to do with the original files which have been
updated many times.
Does anyone have any clues as to what is going on?
The code is pretty simple. Here is the one for setting the columns:
Sub FixDecreeAbstractColumnWidths(Optional control As IRibbonControl)
'
' FixColumnWidths Macro
' Resizes Abstract Column widths to standard format size
ActiveWindow.Zoom = 100
Columns("A:A").Select
Selection.ColumnWidth = 8
Columns("B:B").Select
Selection.ColumnWidth = 2
Columns("C:C").Select
Selection.ColumnWidth = 44
Columns("D:E").Select
Selection.ColumnWidth = 2
Columns("F:F").Select
Selection.ColumnWidth = 44
Columns("G:G").Select
Selection.ColumnWidth = 2
Columns("H:H").Select
Selection.ColumnWidth = 8
Columns("I:J").Select
Selection.ColumnWidth = 8
Columns("K:K").Select
Selection.ColumnWidth = 9
Columns("L:L").Select
Selection.ColumnWidth = 8
Columns("M:M").Select
Selection.ColumnWidth = 8
Columns("N:N").Select
Selection.ColumnWidth = 9
Columns("O").Select
Selection.ColumnWidth = 14
Columns("Q").Select
Selection.ColumnWidth = 2
Columns("R:R").Select
Selection.ColumnWidth = 36
Columns("S:S").Select
Selection.ColumnWidth = 2
ActiveWindow.Zoom = 70
Range("N2").Select
End Sub
Windows XP and created on different screens and resolutions. Sometimes when
I run certain macros that set a default width or row height on all the used
cells, the view comes back distorted in one dimension. Rerunning the macro
doesn't reset it and once changed after running the macros, I've not run
across a way to fix it to my standard template values. Not sure, but it seems
like it must have somethng to do with the original files which have been
updated many times.
Does anyone have any clues as to what is going on?
The code is pretty simple. Here is the one for setting the columns:
Sub FixDecreeAbstractColumnWidths(Optional control As IRibbonControl)
'
' FixColumnWidths Macro
' Resizes Abstract Column widths to standard format size
ActiveWindow.Zoom = 100
Columns("A:A").Select
Selection.ColumnWidth = 8
Columns("B:B").Select
Selection.ColumnWidth = 2
Columns("C:C").Select
Selection.ColumnWidth = 44
Columns("D:E").Select
Selection.ColumnWidth = 2
Columns("F:F").Select
Selection.ColumnWidth = 44
Columns("G:G").Select
Selection.ColumnWidth = 2
Columns("H:H").Select
Selection.ColumnWidth = 8
Columns("I:J").Select
Selection.ColumnWidth = 8
Columns("K:K").Select
Selection.ColumnWidth = 9
Columns("L:L").Select
Selection.ColumnWidth = 8
Columns("M:M").Select
Selection.ColumnWidth = 8
Columns("N:N").Select
Selection.ColumnWidth = 9
Columns("O").Select
Selection.ColumnWidth = 14
Columns("Q").Select
Selection.ColumnWidth = 2
Columns("R:R").Select
Selection.ColumnWidth = 36
Columns("S:S").Select
Selection.ColumnWidth = 2
ActiveWindow.Zoom = 70
Range("N2").Select
End Sub