I am trying to write my code to be more robust so it does not rely on active workbooks, but I cannot figure it out 

the logic of wb.sheets. should tell VBA to perform every following action in the line on the specified wb. But it is not woking for some reason. If the book is not active, my code will not work.

```
Do Until IsEmpty(file) <> False  
        Workbooks.Open Filename:=DataPath & file
        Windows(ReportName).Activate 'I would like to not have to activate windows
        LastRow = Sheets(Sheets.count).Cells(Rows.count, "E").End(xlUp).Row 'i.e. how would this code be written if it is not the active window?
        Windows(file).Activate 'same same but different 
        LastRowTemp = Sheets(1).Cells(Rows.count, "E").End(xlUp).Row
        Range(Cells(2, 48), Cells(LastRowTemp, 48)).Copy Workbooks(ReportName).Sheets(ws).Range("A" & LastRow + 1) 'how do i copy from 1 wb to a 2nd, assuming both are non-active?

```

Thanks!
Kyle

I expect to be able to have a code that does not rely on active workbooks. I.e. `LastRow = wb.Sheets(wb.Sheets.count).Cells(Rows.count, "E").End(xlUp).Row`