Clipboard Message

I

itsyash

Hi All,

I am running a macro that opens two files, copies 2500 records from one
file to the other and then one of the files is closed.

Now while closing this file, i get a message saying "There is a large
amount of data on the clipboard. Do you want to be able to paste this
information into another program later?"

Along with this it gives me yes/no and cancel buttons.

I dont want this box to appear and also clear the clipboard before the
file closes. Is there a way to do this?

I want to avoid send key..

I appreciate any help.

Thanks,
Yash
 
T

Tom Ogilvy

Application.DisplayAlerts = False
Activeworkbook.Close SaveChanges:=False
Application.DisplayAlerts = True

or similar to as Steve suggest

Activecell.copy
Activeworkbook.Close SaveChanges:=False

Or as Steve suggested
Application.CutcopyMode = False
Activeworkbook.Close Savechanges:=False
 

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