Clipboard - "No" to Paste Info Later

G

Graham

Hi,

I have a macro which opens a lot of documents (approx 90)
as text files, extracts some data and copies this into
excel for manipulation. The problem I have is that when
the macro is closing each text file a large amount of data
has already been copied to the clipboard.I get the
following message:

"There is a large amount of information on the Clipboard.
Do you want to be able to paste this information to
another program later?"

User intervention is required which I want to avoid.I
always want to select "No" to this option, but at the
moment I have to do it 90+ times. Is there some code I can
insert to my macro to automatically select "No" each time?

Help gratefully received.

Graham
 
F

Frank Stone

hi.
Try this:
Application.DisplayAlerts = False
ActiveWorkbook.Save
ActiveWorkbook.Close
Application.DisplayAlerts = True
 

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