Hi, I am relatively new to writing in VBA in Excel and am so far self taught with the help of forums and google. Below is the code I have to run, which currently is taking upto 5mins because of the main file which is 17MB, and all the child files are 3MB. I need to run the same routine for a total of 6 different workbooks, drawing from them and copying the values in to the master workbook.
Sub Update()
'
' Update Macro
'
Workbooks.Open Filename:= _
"(location and filename)"
Windows("file name").Activate
Sheets("Ref").Select
Range("A1:F2210").Select
Selection.Copy
Windows("file name 2").Activate
Sheets("Ref").Select
Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Workbooks("file name 2").Close SaveChanges:=False
Sheets("File name").Select
Range("A1").Select
End Sub
I know it is long and clunky but it has worked, all be it very slowly. Any suggestions how to make this faster would be much apperciated
Sub Update()
'
' Update Macro
'
Workbooks.Open Filename:= _
"(location and filename)"
Windows("file name").Activate
Sheets("Ref").Select
Range("A1:F2210").Select
Selection.Copy
Windows("file name 2").Activate
Sheets("Ref").Select
Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Workbooks("file name 2").Close SaveChanges:=False
Sheets("File name").Select
Range("A1").Select
End Sub
I know it is long and clunky but it has worked, all be it very slowly. Any suggestions how to make this faster would be much apperciated