I have the following code, which when ran opens another excel workbook based on the cell reference below. The file path in the cell reference = "strFName". My code works up until the other workbook is opened. After the workbook is opened I get an error message...Basically I need to know how to activate the newly opened workbook so that I can copy a range on one of its sheets. If someone could assist, that would be great. Thanks.
Sub extract_TRIAL()
Dim strFName As String
strFName = Sheets("Instructions").Range("W1").Value
Workbooks.Open Filename:=strFName
Application.Windows(Range("w2").Value).Activate
Sheets("Readiness").Range("A2:P2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sub extract_TRIAL()
Dim strFName As String
strFName = Sheets("Instructions").Range("W1").Value
Workbooks.Open Filename:=strFName
Application.Windows(Range("w2").Value).Activate
Sheets("Readiness").Range("A2:P2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy