I am using a union subroutine to grab data from one sheet, parse it, and place it in another. Why does this code not work when it is called, but works when I step through it?
Sub Get_Time_ps()
Application.ScreenUpdating = False
Dim Row As Long
Dim LastRow As Long
Dim i As Long
Dim Rng As Range
Set Rng = Range("A9")
i = 15
ActiveWorkbook.Sheets(3).Activate
Range("A9").Select
Row = Selection.End(xlDown).Row
LastRow = Row - 8
Range("A9").Select
For i = 15 To LastRow Step 6
Set Rng = Union(Rng, Range("A" & i))
Next i
Row = Rng.Count - 1
Rng.Select
Selection.Copy
Sheets("Raw Data").Select
Range("A23").Select
ActiveSheet.Paste
Cells.Find("Time").Select
Selection.Copy
Cells.Find("Time").Offset(1, 0).Select
Range(Selection, Selection.Offset(Row, 4)).Select
Selection.PasteSpecial xlFormats
Application.ScreenUpdating = True
End Sub