A
aneurin
all this macro does is save the Summary Report Master worbook and
create a copy of it in another folder
everything works fine up untill this point
as you can see i then select the workbook Data Summary Report Query
and try to close it
but it will not close
can anyone point me in the right direction
cheers
aneurin
Sub Main()
Sheets("Data Summary").Select
Range("A6").Select
ChDir "c:\Documents and Settings\Desktop"
Workbooks.Open Filename:= _
"c:\Documents and Settings\Desktop\Summary Report Master.xls"
Sheets("Data Summary").Select
Windows("Data Summary Report Query.xls").Activate
Range("a1:h20").Select
Selection.Copy
Windows("Data Summary Report Master.xls").Activate
Sheets("Data Summary").Select
Range("A6").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=False
Range("A6").Select
Windows("Data Summary Report master.xls").Activate
Application.Run "'Data Summary Report master.xls'!saveit"
Windows("Data Summary Report Query.xls").Activate
Sheets("data summary").Select
Range("a1").Select
'saveitn
Application.DisplayAlerts = False
ActiveWorkbook.Close
End Sub
create a copy of it in another folder
everything works fine up untill this point
as you can see i then select the workbook Data Summary Report Query
and try to close it
but it will not close
can anyone point me in the right direction
cheers
aneurin
Sub Main()
Sheets("Data Summary").Select
Range("A6").Select
ChDir "c:\Documents and Settings\Desktop"
Workbooks.Open Filename:= _
"c:\Documents and Settings\Desktop\Summary Report Master.xls"
Sheets("Data Summary").Select
Windows("Data Summary Report Query.xls").Activate
Range("a1:h20").Select
Selection.Copy
Windows("Data Summary Report Master.xls").Activate
Sheets("Data Summary").Select
Range("A6").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=False
Range("A6").Select
Windows("Data Summary Report master.xls").Activate
Application.Run "'Data Summary Report master.xls'!saveit"
Windows("Data Summary Report Query.xls").Activate
Sheets("data summary").Select
Range("a1").Select
'saveitn
Application.DisplayAlerts = False
ActiveWorkbook.Close
End Sub