title: When I run a macro it blanks the data in the fields
body: <p>Why are all fields blank after this macro is executed?  When I run this macro it blanks all of the data in the fields but formats the sheet correctly.  It happens between the .apply and End with, just before the active window screens.  I did not write this macro, any help would be appreciated. </p>
  
  <p>I have used the step into feature to find where this unwanted behavior happens.</p>
  
  <pre><code>    Columns("T:AD").Select
      Application.CutCopyMode = False
      Selection.Copy
      Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
          :=False, Transpose:=False
      Columns("I:S").Select
      Range("S1").Activate
      Application.CutCopyMode = False
      Selection.Delete Shift:=xlToLeft
      Range("A1:S1000").Select
      Range("D1").Activate
      Selection.Borders(xlDiagonalDown).LineStyle = xlNone
      Selection.Borders(xlDiagonalUp).LineStyle = xlNone
      With Selection.Borders(xlEdgeLeft)
          .LineStyle = xlContinuous
          .ColorIndex = 0
          .TintAndShade = 0
          .Weight = xlThin
      End With
      With Selection.Borders(xlEdgeTop)
          .LineStyle = xlContinuous
          .ColorIndex = 0
          .TintAndShade = 0
          .Weight = xlThin
      End With
      With Selection.Borders(xlEdgeBottom)
          .LineStyle = xlContinuous
          .ColorIndex = 0
          .TintAndShade = 0
          .Weight = xlThin
      End With
      With Selection.Borders(xlEdgeRight)
          .LineStyle = xlContinuous
          .ColorIndex = 0
          .TintAndShade = 0
          .Weight = xlThin
      End With
      With Selection.Borders(xlInsideVertical)
          .LineStyle = xlContinuous
          .ColorIndex = 0
          .TintAndShade = 0
          .Weight = xlThin
      End With
      With Selection.Borders(xlInsideHorizontal)
          .LineStyle = xlContinuous
          .ColorIndex = 0
          .TintAndShade = 0
          .Weight = xlThin
      End With
      Columns("G:G").EntireColumn.AutoFit
      Columns("I:I").EntireColumn.AutoFit
      Cells.Select
      Range("D1").Activate
      Cells.EntireColumn.AutoFit
      Rows("1:1").Select
      Range("D1").Activate
      Selection.Font.Bold = True
      Cells.Select
      Range("D1").Activate
      ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Clear
      ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Add Key:=Range("P2:P1000") _
          , SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
      With ActiveWorkbook.Worksheets("Sheet1").Sort
          .SetRange Range("A1:AD1000")
          .Header = xlYes
          .MatchCase = False
          .Orientation = xlTopToBottom
          .SortMethod = xlPinYin
          .Apply
      End With
      ActiveWindow.SmallScroll Down:=-33
      ActiveWindow.ScrollColumn = 2
      ActiveWindow.ScrollColumn = 3
      ActiveWindow.ScrollColumn = 4
      ActiveWindow.ScrollColumn = 5
      ActiveWindow.ScrollColumn = 6
      ActiveWindow.ScrollColumn = 7
      ActiveWindow.ScrollColumn = 8
      ActiveWindow.ScrollColumn = 9
      ActiveWindow.ScrollColumn = 10
      ActiveWindow.ScrollColumn = 11
      ActiveWindow.ScrollColumn = 12
      ActiveWindow.ScrollColumn = 13
      ActiveWindow.ScrollColumn = 14
      ActiveWindow.ScrollColumn = 15
      ActiveWindow.ScrollColumn = 16
      Range("A28").Select
      ActiveWindow.SmallScroll Down:=-75
      Rows("2:2").Select
      Selection.Delete Shift:=xlUp
  End Sub
  </code></pre>