Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2009

    Question Unanswered: appending data in workbook

    I need a macro for opening a file (User can select file), copy the data from the Sheet, append it to the exisiting open workbook (workbook with the macro)in the way, the data that is already present gets deleted.

    am looking out for the solution for the past 2 days and eating my head ....
    pls help me to solve this...thanks in advance

  2. #2
    Join Date
    Nov 2004
    record a macro on the fly
    open workbook where you want to append the data
    open a workbook where you are getting you data to do the append
    record macro
    do a shift control home, then put your cursor in cell a1, then do a shift ctrl end then ctrl c to copy then select window and the other work book, then put your cursor into cell a1 then do a ctrl end, ctrl left arrow, then a ctrl p to paste
    then flip back to your other workbook and close it.
    Then stop recording. Look at the macro that was created.
    then you can see the relevant syntax and then modify tweak to automate more fully, ie inputbox for filename, directory paths, etc, starting line, ending line, however you want to tweak.
    This is a good way to learn how to do macros, record what you are trying to achieve and then review what the recorder has done and fill in the gaps.

Posting Permissions

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