Hello,can you help me,I want code that can do that,I create mother Excel,then open other excel,read value that i need,then write the value in mother Excel,then save new file,I need code can reply do it ,more and more,Thanks!
Hello,can you help me,I want code that can do that,I create mother Excel,then open other excel,read value that i need,then write the value in mother Excel,then save new file,I need code can reply do it ,more and more,Thanks!
Perhaps something like:
[VBA]Sub Copy_Data()
Dim oBook As String
oBook = ThisWorkbook.Name
Workbooks.Open ("C:\MyWorkbook.xls")
Sheets("Sheet1").Range("A1:A" & Range("A" & Rows.Count).End(xlUp).Row).Copy
Workbooks(oBook).Activate
Sheets("Sheet1").Activate
With Sheets("Sheet1").Range("A" & Rows.Count).End(xlUp).Offset(1, 0)
ActiveSheet.Paste
End With
Workbooks("MyWorkbook").Close False
ThisWorkbook.SaveAs (ThisWorkbook.Name & " - " & Format(Date, "dd-mm-yyyy"))
End Sub[/VBA]
Regards,
Simon
Please read this before cross posting!
In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
If I have seen further it is by standing on the shoulders of giants.
Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)
Thank you very much