I am trying to paste a sheet from one workbook into another workbook.
Im not getting any errors but it is not pasting anything either.
Please Login or Register to view this content.
I am trying to paste a sheet from one workbook into another workbook.
Im not getting any errors but it is not pasting anything either.
Please Login or Register to view this content.
Last edited by zbor; 05-19-2014 at 06:35 AM.
You're not copying the correct thing - the cells:
Please Login or Register to view this content.
Bernie Deitrick
Excel MVP 2000-2010
Bernie Deitrick
It HiLites "TrueSheets" and gives me an error "Sub or Fuction not defined"
I get a "Subscript out of range" error after I enter the path and name.
If your workbook is open, then you do not include the path, just the file name - hence the Workbooks("Book3.xlsm"). You need to match what the file name you are using.
If your workbook is not open then you need to open it first, but your code did not show that.
Not sure what you meant by "TrueSheets" - that is not part of my code. My code works (without error) when I have two workbooks open, each with a sheet named "Sheet2" and one of the books named Book3.xlsm.
I tried to edit my post but it did not take.
The TrueSheets was my mistake.
My copy paste placed it at the end of the line above which ended with True, When I pasted your code it made it TrueSheets.
I saw it after I sent off my reply.
Sorry but also thank you for your help.
Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.
Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.
Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
(This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
If I have helped, Don't forget to add to my reputation (click on the star below the post)
Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
Use code tags when posting your VBA code: [code] Your code here [/code]
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks