I have a VBA code that copies data from one workbook to another. After the copy, I get a…
- User
I have a VBA code that copies data from one workbook to another. After the copy, I get a Microsoft Excel pop up that says; '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 Pop Up has three button options' Yes No Cancel.
I have tried using the following 'Application.DisplayAlerts = False' to stop this Pop Up from opening when I run the code, but the message still pops up
- Assistant
The
Application.DisplayAlerts = Falsestatement only suppresses the standard Excel alerts, not the pop-up message you are encountering. To prevent the pop-up, you can clear the clipboard before performing the copy operation. Here's an example of how you can modify your code to clear the clipboard before copying the data:Sub CopyData() ' Clear the clipboard Application.CutCopyMode = False Application.Wait (Now + TimeValue("0:00:01")) ' Wait for a second ' Copy data from one workbook to another ' Your existing code here End SubBy clearing the clipboard before copying the data, the pop-up should no longer appear.