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?
 

Some videos you may like

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

Gerald Higgins

Well-known Member
Joined
Mar 26, 2007
Messages
9,115
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,764
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,115

ADVERTISEMENT

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

Watch MrExcel Video

Forum statistics

Threads
1,122,216
Messages
5,594,886
Members
413,947
Latest member
gizmolucy

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