Consulting

Results 1 to 4 of 4

Thread: copy specific columns from one excel file to already opened excel file

  1. #1
    VBAX Mentor
    Joined
    Sep 2007
    Posts
    405
    Location

    copy specific columns from one excel file to already opened excel file

    Hello?

    Here is my requirement?

    I just want to copy the highlighted columns in Book1.xls to another excel file named sample.xls which is already open.
    Can this be done and if so please help me out.

    -Sindhuja

  2. #2
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    Have you tried recording a macro that does this? After you have an understanding of what it does we can help you clean it up.
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  3. #3
    VBAX Mentor
    Joined
    Sep 2007
    Posts
    405
    Location
    Yes Lucas...
    I recorded a macro to do my task and it works fine....

    How can this be done without opening the target file [sample.xls] i need to copy the contents from the source with only the source file [Book1.xls]opened.

    i need to specify the target file name using coding.

    -Sindhuja

  4. #4
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    Put these in the same directory and run the book1.xls

    alternatly you can specify a path using commented code in the module or you can browse using some of the commented code if you choose that method.
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

Posting Permissions

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