I want to copy the content of variable other Workbooks depending of the scenario (example: I want to copy the data from Workbook data2013 or data2014, etc). I've been able to do it with a specific Workbook by using the following macro. Now I want the "\data2013.xls" to change depending of the scenario. I already created a function that will generate the right path into Cell: RawData!$A$2. I thought I could use a variable but I'm quit new with VBA, could you help me out?
Sheets("RawData").Select
Workbooks.Open Filename:=ThisWorkbook.Path & "\data2013.xls"
Sheets("Documents").Select
ActiveSheet.Unprotect
ActiveSheet.ShowAllData
Range("$A$4:$T$65536").Select
Selection.Copy
Windows("Reports.xls").Activate
Range("C1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("A1").Select