Trying to copy an existing sheet from one workbook to a new book. I use the sheet to make pivot tables that are in weekly reports. So in this case, I am trying to move a sheet called “Accounts” from Book1 to Book2.
This is my code so far:
sheets("Accounts").copy before :=workbooks("Book2").sheets("Sales")
I am getting the out of range error, I am assuming because I don’t specify where the “Accounts” sheet is coming from, however I have been unable to find proper answers from Google.
I have a line of code that I used previously to copy a range:
I don’t know if that code would apply to the problem at hand, but if it does please let me know.
Appreciate the help!