Team,
I have currently built a report for senior management by which information from Excels workbook is copied to MS Office using VBA. The whole report works except for this ridiculous milestone which I can not get rid of. I am constantly given a message box which states "There is a large amount of information on the clipboard. Do you want to be able to paste this information into another program later?" The options I have been given are "Yes", "No", and "Cancel".
Is there a way I can turn this off using VBA? The code snippet I am using currently in my MS Word File is:
--------------------------
----------
----------
----------
-
Set xlApp = CreateObject("Excel.Applic
ation")
xlApp.Visible = True
Set xlWB = xlApp.Workbooks.Open(Execu
tive_Repor
t_WB)
Application.DisplayAlerts = False
xlWB.sheets("Executive Summary").Select
xlWB.Activesheet.Range("D7
:Q39").Cop
y
Selection.PasteSpecial
xlWB.Close False ' close the workbook without saving
xlApp.Quit ' close the Excel application
Set xlWB = Nothing
Set xlApp = Nothing
Application.DisplayAlerts = True
--------------------------
----------
----------
----------
-
**** PLEASE NOTE: The code works perfectly if I say "Yes" or "No" to the clipboard dialog box. I have tried using the the DisplayAlerts command as you can see in my code snippet but doesn't seem to work.
Start Free Trial