View Single Post
  #5  
Old 3rd July 2013, 06:55 AM
Puntz Puntz is offline
Member
 
Join Date: Jan 2012
Posts: 292
Default

Ok,
this is a start, but can be tweaked as required

What you need to test this is 2 Workbooks
Name the 1stWBk;
MASTER_WORKBOOK.xlsm
and place the macro code shown below in that WB

Name the 2nd WBk;
CURRENT_WORKBOOK.xlsm

The code assumes the WBk's are are in C:\

Use the F8 key to step through the macro for testing.


Code:
Sub Transfer_Test() Application.DisplayAlerts = False Workbooks.Open Filename:="C:\CURRENT_WORKBOOK.xlsm" Windows("MASTER_WORKBOOK.xlsm").Activate Sheets("Sheet1").Select Sheets("Sheet1").Copy Before:=Workbooks("CURRENT_WORKBOOK.xlsm").Sheets(1) Application.WindowState = xlMinimized ActiveCell.FormulaR1C1 = "" ActiveWorkbook.SaveAs Filename:= _ "C:\CURRENT_WORKBOOK.xlsm", FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False ActiveWindow.Close ActiveWorkbook.Save Application.DisplayAlerts = True End Sub
Reply With Quote