excel freezes due to Application.DisplayAlerts
Hi all,
Im copying and pasting data from one workbook to another but when I want to close the source workbook, it comes up with this message that I have much data and if I want to keep this in a clipboard. I thought I could disable this with Application.DisplayAlerts = False but when I do this, Excel freezes. Im I doing something wrong
regardsPaul from Holland.
Public path As String
Sub Get_data()
'
' Get_data Macro
Application.DisplayClipboardWindow = False
'
path = "\\Nlchoosa.nl\OPS_Processes$\OPS_Processes\Report s\Sector performance\"
Workbooks.Open Filename:=path & "Reports\Sector Performance Reporting week.xls"
Range("A1").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.copy
Windows("Sector Performance report Week.xls").Activate
ActiveSheet.Paste
Application.DisplayClipboardWindow = False
Windows("Sector Performance Reporting week.xls").Activate
Application.DisplayAlerts = False
ActiveWindow.Close SaveChanges:=False
End Sub
|