Quote:
I got an error of <Subscript out of range>.
This means that
Trials.xslm
is closed. You have to open it before you start doing anything else.
Dim wbk As Workbook
Set wbk = Application.Workbooks,Open("FullPathAndFilename.xlsx")
For Each ws In wbk.Worksheets