Item in clipboard

J

jamessinc

I have a macro that will open a file and copy a range to another file. Then
I will close the file I copied the range from but I am asked if I wish to
clear the clipboard after each copy. How do I stop the clipboard request
from stoping the macro?

Thanks
Jim
 
F

Frank Kabel

Hi
try
application.displayalerts=false
'close the file
application.displayalerts=true
 
G

Gord Dibben

Jim

After the copy and paste is complete and before you close the file add this
line

Application.CutCopymode = False

Gord Dibben Excel MVP
 

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