ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Empty clipboard (https://www.excelbanter.com/excel-discussion-misc-queries/144542-empty-clipboard.html)

Jeff

Empty clipboard
 
Hi,

This might be a dumb question. I have a macro - it opens a workbook, copies
a range, pastes the range in the original workbook, then closes the workbook
that was opened in the first place.

It promps to save the clipboard - how do you turn this off?

Thanks for your help

FSt1

Empty clipboard
 
hi,
somewhere before the close put this in the macro
Application.displayalerts = false
and before end sub
Application.displayalerts = true.
when turning off a built in excel function to run a macro, always turn in
back on BEFORE you exit the sub.

Regards
FSt1

"Jeff" wrote:

Hi,

This might be a dumb question. I have a macro - it opens a workbook, copies
a range, pastes the range in the original workbook, then closes the workbook
that was opened in the first place.

It promps to save the clipboard - how do you turn this off?

Thanks for your help


Ron de Bruin

Empty clipboard
 
Hi Jeff

After the paste line add this line to clear the clipboard

Application.CutCopyMode = False



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Jeff" wrote in message ...
Hi,

This might be a dumb question. I have a macro - it opens a workbook, copies
a range, pastes the range in the original workbook, then closes the workbook
that was opened in the first place.

It promps to save the clipboard - how do you turn this off?

Thanks for your help



All times are GMT +1. The time now is 06:13 PM.

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