Opening two files and copying information

  • Hi!

    I cant seem to fix this one... but its been a while since i do this.

    i am trying to:

    1. Ask user to select two files to open via a prompt.

    2. Clear the data in the "AP Template" file (file 1)

    3. Copy Data from "HL Data Sheet" workbook (file 2)

    4. Paste into predefined cell in file 1 "AP Template"

    5. Save as "AP Template" as new file

    Issue: it gets stuck in step 4. activating the "AP template" file again. hence i cannot copy the data back into the first file.

    Any advice on what I am missing? Here is the code. (any other advice also welcomed!)


  • I've guessed some of the ranges so try this

    I actually think that you would be better off creating an actual template instead.

    Excel Templates

  • wow Roy! this is fantastic and super fast! thank you so much!

    i can see what you mean, so much cleaner!

    its been 10 years since I've done any VBA Codes so I am trying to brush it off to help out my team a little.

    Thank you again! and happy Monday!