Copy sheet from Workbook 1 and move to the end Workbook 2

IAP

New Member
Joined
Aug 6, 2020
Messages
8
Office Version
  1. 2010
Platform
  1. Windows
I have Tried using almost every code on the internet and just tried MrExcels code below, and I just keep getting errors.
Sub CopySheetToNewPage ()
Workbooks.Open Filename:="C:\Users\jfjen\Desktop\New Mold Program\AAA Master File\Location Forms.xlsm"
Sheets("Location 2").Copy After:=Workbooks("A12.Basic Reports.xlsm").Sheets(Sheets.Count)
ActiveSheet.Name = "Location 2"
Workbooks("A12.Basic Reports.xlsm").Close savechanges:=False
End Sub

Workbook name - Location Forms.xlsm has a sheet named Location 2.
I want to copy and Paste sheet named Location 2 into Workbook named A12.Basic Reports.xlsm
After a sheet named Location 1
 
Tried every way and combination. Either Line goes Red or back to Yellow.
Same thats happened for days.
Thank You for helping so long, but I think its time to give up on the idea that this will work and I will have to try to rethink my program.
It seems like it should be so simple, buts its very hard for the person that is a novice.
 
Upvote 0

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
If you open the Location Forms file & select the Location 1 sheet, then run this
VBA Code:
Sub Check()
   MsgBox "|" & ActiveSheet.Name & "|" & vbLf & Len(ActiveSheet.Name)
End Sub
What exactly doe the message box say?
 
Upvote 0
I gave up on that code.
I found another when I was closing out on another site just as I was giving up.
I plugged in the same information and it ran the first time.
Thanks to everyone that was helping me.
 
Upvote 0

Forum statistics

Threads
1,214,516
Messages
6,119,980
Members
448,934
Latest member
audette89

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top