Try this, it assumes that Door_Inventory is the workbook with the code:
VB Code:
Option Explicit Sub COPY_FROM_MainSched_TO_DoorSched() Dim SourcePath As String Dim DestPath As String Dim SourceFile As String Dim DestFile As String Dim SourceWbk As String Dim DestWbk As String 'set variables SourcePath = "H:\schedule\" DestPath = "H:\shared_tools\" SourceFile = "Cabot, s.xls" DestFile = "door_inventory.xls" SourceWbk = SourcePath & SourceFile DestWbk = DestPath & DestFile 'Disable alerts & screen updating Application.DisplayAlerts = False Application.ScreenUpdating = False 'Open the source workbook Workbooks.Open SourceWbk 'Copy the sheet from the source workbook to the Destination workbook ActiveWorkbook.Sheets("Log(2)").Copy after:=ThisWorkbook.Sheets("Menu") Windows(DestFile).Activate Application.DisplayAlerts = True Application.ScreenUpdating = True End Sub




Reply With Quote