Copy Unknown Number Of Sheets To Workbook

  • I need to write code to copy and paste a sheet (Sheet D) in one workbook to the back of another workbook (so the copied Sheet D becomes the last sheet in the recipient workbook). The number of sheets in the recipient workbook will change month on month, so the code can not be dependent on pasting after a certain number of sheets - as I have at present;


    Code
    Sheets("D").Copy After:=Workbooks("Book5").Sheets(3)


    I have tried using

    Code
    Sheets("D").Copy After: End


    but this does not work. Please can you help?


    Thanks


    Jon

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!