Hello!
First of all I am a beginner of this, but I know what I want to achive, just not realy how to.
My problem:
Workbook1.xlsx contains data in coloums A to Y. Number of rows may vary.
Workbook2.xls
Here I want to have a macro that imports those rowns with data from workbook1 starting on A11.
The relative path from workbook2 to workbook1 is: ..\Reports\Workbook1.xlsx\
The code Ive been testing (found it on google) is this:
Private Sub ImportDataTest_Click()
Dim Target_Workbook As Workbook
Dim Source_Workbook As Workbook
Dim Target_Path As String
Target_Path = "C:\Models\Reports\Workbook1.xls"
Set Target_Workbook = Workbooks.Open(Target_Path)
Set Source_Workbook = ThisWorkbook
Target_Data = Target_Workbook.Sheets(1).Cells(1, 1)
Source_Workbook.Sheets(1).Cells(1, 1) = Target_Data
Source_data = Source_Workbook.Sheets(1).Cells(3, 1)
Target_Workbook.Sheets(1).Cells(2, 1) = Source_data
Source_Workbook.Save
Target_Workbook.Save
Target_Workbook.Close False
MsgBox "Armeringen importerad"
End Sub
This give me data from A1 in workbook1 importet do A1 in workbook 2. So its someting...
Can enyone help me with this? 
Regards
E
Bookmarks