Consulting

Results 1 to 3 of 3

Thread: Can you help me?I want code

  1. #1

    Can you help me?I want code

    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!

  2. #2
    Moderator VBAX Guru Simon Lloyd's Avatar
    Joined
    Sep 2005
    Location
    UK
    Posts
    3,003
    Location
    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)

  3. #3
    Thank you very much

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •