Remove annoying message "Do you want to save data on clipboard"

Wamhoi

New Member
Joined
Mar 4, 2011
Messages
48
So I created a VBA that closes an activeworkbook but then I get this message that says "There is a large amount of information on the clipboard. Do you want to be able to paste this information into another program later?"

I want to always say no.

Does anyone know how I can do this?
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Gerald Higgins

Well-known Member
Joined
Mar 26, 2007
Messages
9,194
I haven't tested this, but I think
Code:
Application.DisplayAlerts=False
will do this.

You might want to set it back to True afterwards, if there are other alerts that you do want to see.
 

njimack

Well-known Member
Joined
Jun 17, 2005
Messages
7,772
Have you tried clearing the clipboard after copying your data?
Application.CutCopyMode = False
 

Wamhoi

New Member
Joined
Mar 4, 2011
Messages
48
Perfect! Application.cutcopymode = false did the trick. I didn't test the other but I'm sure it does the same.

Thanks!
 

Gerald Higgins

Well-known Member
Joined
Mar 26, 2007
Messages
9,194

ADVERTISEMENT

They certainly don't do the same thing, although they would probably both work in your situation.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,898
Messages
5,834,295
Members
430,274
Latest member
TME1993

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top