ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Clipboard (https://www.excelbanter.com/excel-programming/318260-clipboard.html)

Randy[_15_]

Clipboard
 
When using macros to retreive data from other spreadsheets (along with
copy and paste) and when closing the spreadsheet a dialog box appears
asking if you want to save the the information to the clipboard which
stops the macro until you answer the dialog box. Is there a way to
close the dialog box and not save the information on the clipboard in
the macro instead of having to answer.

noel mcwilliam

Clipboard
 
Just an idea but I worked round that one by saving data in an array (i.e. using
myArray = myRange.value etc) rather than using copy and paste.
The only problem is that cell formats wont be saved.

Regards
Noel


"Randy" wrote:

When using macros to retreive data from other spreadsheets (along with
copy and paste) and when closing the spreadsheet a dialog box appears
asking if you want to save the the information to the clipboard which
stops the macro until you answer the dialog box. Is there a way to
close the dialog box and not save the information on the clipboard in
the macro instead of having to answer.


Tom Ogilvy

Clipboard
 
after copying do

application.CutCopy = False

--
Regards,
Tom Ogilvy

"Randy" wrote in message
om...
When using macros to retreive data from other spreadsheets (along with
copy and paste) and when closing the spreadsheet a dialog box appears
asking if you want to save the the information to the clipboard which
stops the macro until you answer the dialog box. Is there a way to
close the dialog box and not save the information on the clipboard in
the macro instead of having to answer.




Chip Pearson

Clipboard
 
You can clear the clipboard with the follow code:

Application.CutCopyMode = False


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Randy" wrote in message
om...
When using macros to retreive data from other spreadsheets
(along with
copy and paste) and when closing the spreadsheet a dialog box
appears
asking if you want to save the the information to the clipboard
which
stops the macro until you answer the dialog box. Is there a
way to
close the dialog box and not save the information on the
clipboard in
the macro instead of having to answer.




Tom Ogilvy

Clipboard
 
Dang, typo
Application.CutCopyMode = False

--
Regards,
Tom Ogilvy

"Tom Ogilvy" wrote in message
...
after copying do

application.CutCopy = False

--
Regards,
Tom Ogilvy

"Randy" wrote in message
om...
When using macros to retreive data from other spreadsheets (along with
copy and paste) and when closing the spreadsheet a dialog box appears
asking if you want to save the the information to the clipboard which
stops the macro until you answer the dialog box. Is there a way to
close the dialog box and not save the information on the clipboard in
the macro instead of having to answer.







All times are GMT +1. The time now is 11:22 AM.

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