Need VB code to clear contents of clipboard

velohead

Board Regular
Joined
Aug 22, 2007
Messages
212
Hi All,

I have a macro that opens particular spreadsheets, copies data to a 'master' spreadsheet, then closes the un-needed spreadsheets, 20 in all.

Works well but I get the following message for each spreadsheet being closed...
"there is a large amont of info on the clipboard
click yes to save in clipboard
click no to clear clipboard"

I need to say "No" in each instance of this, ie 20 times each time the macro is run.


Question - what is the command to clear the clipboard WITHOUT saving the file(s), so that I dont need to say "No" in each instance.
Also I prefer NOT to have any 'error handler' such as...on error resume next.

Thx.
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
I was using...
Windows("FY12 Budget - AHFS Branch.xls").Activate
ActiveWorkbook.Close

but I am now using...
Windows("FY12 Budget - AHFS Branch.xls").Activate
ActiveWorkbook.Close False


but the clipbooard message still comes up.
It should work with the above I assume ???
Is this correct ?
 
Upvote 0
try

Application.CutCopyMode = False
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,849
Members
452,948
Latest member
UsmanAli786

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
Back
Top