So i'm almost there, my script is recognising the file path and copying the cells however all I want it to do is paste the values starting in 'A2' however i'm getting runtime error '91' and will not paste. Any thoughts?
Sub Import_survey()
' Import_survey Macro
'
Dim wbSurvey As Workbook
Dim fromSheet As Worksheet
Dim toSheet As Worksheet
Dim fpath As String
Dim fname As String
Set ws = ThisWorkbook.Sheets("Survey")
fpath = ws.Range("Q8").Value
fname = ws.Range("Q5").Value
Set wbSurvey = Workbooks.Open(Filename:=fpath & fname)
Set fromSheet = wbSurvey.Sheets("Definitive")
'Your stated requirement: import into sheet 'Survey' to cells "A20:I500" from cells "I12:I500" in 'Survey_Report'.
fromSheet.Range("A20:I500").Copy
toSheet.Range("A2").PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
End Sub
Bookmarks