Auto Answering and Clearing the Clipboard

G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top