View Single Post
 
Old 04-26-2017, 07:28 PM
Logit Logit is offline Windows 10 Office 2007
Expert
 
Join Date: Jan 2017
Posts: 533
Logit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the rough
Default

VBA Copy Worksheet: To Specific Workbook

Either macro needs to be pasted into a Routine Module in the workbook you are copying FROM.

Please find the below example, It will show you how to Copy the Worksheet named ‘Sheet1’ to Specific workbook before ‘Sheet3’.

Code:
Sub CopySheet_SpecificWorkbook ()
Sheets("Sheet1").Copy Before:=Workbooks("YourWorkbookName.xls").Sheets(“Sheet3”)
End Sub

Please find the below example, It will Copy the active worksheet to Specific workbook after ‘Sheet3’.

Code:
Sub CopySheet_SpecificWorkbook ()
ActiveSheet.Copy After:=Workbooks("YourWorkbookName.xls"). Sheets(“Sheet3”)
End Sub
Resource :

https://analysistabs.com/vba/copy-worksheet/
Reply With Quote