Auto Answering and Clearing the Clipboard

A

ager_merityme

I am copying data from one sheet, closing it, pasting it to another, then
opening a new sheet, copying data, and pasting it again to the other
sheet...this goes on 21 times so that 21 pastes are pasted to one spreadsheet
from 21 different files.

Everytime I run the macro that does this I get a message that asks if I want
to save it to the clipboard, I naturally have to answer yes...

Is there a way, within the macro, that the answer can be done automatically,
and also is there a way to clear out the clipboard for memory purposes all in
VBA?

Thanks!
 
T

Tom Ogilvy

Application.DisplayAlerts = False
' code that causes prompt - assume close workbook
Application.dislayAlerts = True


application.CutCopyMode = False

will clear a range from a clipboard.
 
Top