ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Clearing the clipboard (https://www.excelbanter.com/excel-programming/339026-clearing-clipboard.html)

Greg Billinge

Clearing the clipboard
 
Hi,

How do i get my marcos to automatically clear the clipboard when closing a
file. Currently, the macros close a csv file once the contents have been
copied into a central sheet. I am then faced with the question "There is a
large amount of data in the clipboard, would you like to keep it.........."

Once macro does this to 15 files and it is really annoying to have to keep
clicking 'No' when i run it.

Any help is much appreciated

Cheers

Greg

FSt1

Clearing the clipboard
 
hi,
At the end of your macro put this

Application.cutcopymode = false

Regards
FSt1

"Greg Billinge" wrote:

Hi,

How do i get my marcos to automatically clear the clipboard when closing a
file. Currently, the macros close a csv file once the contents have been
copied into a central sheet. I am then faced with the question "There is a
large amount of data in the clipboard, would you like to keep it.........."

Once macro does this to 15 files and it is really annoying to have to keep
clicking 'No' when i run it.

Any help is much appreciated

Cheers

Greg


Peter Rooney

Clearing the clipboard
 
Greg,

You could also use:

application.displayalerts=false

before your processing starts. This will also suppress messages like "File
already exists - overwrite?"

You can turn the display on and off within a macro with =true/=false, but
the setting reverts to true when the macro stops running

Hope this helps

Pete




"Greg Billinge" wrote:

Hi,

How do i get my marcos to automatically clear the clipboard when closing a
file. Currently, the macros close a csv file once the contents have been
copied into a central sheet. I am then faced with the question "There is a
large amount of data in the clipboard, would you like to keep it.........."

Once macro does this to 15 files and it is really annoying to have to keep
clicking 'No' when i run it.

Any help is much appreciated

Cheers

Greg



All times are GMT +1. The time now is 12:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com