Full Version: How to turn off clipboard clear notice in macro?
UtterAccess Discussion Forums > Microsoft® Office > Microsoft Excel
basson
I'm running an Excel Macro fro inside of an access module. Part of the Excel macro does a copy paste.
How can I stop the message box "You have a lot of data copied to the clipboard"..asking "do you want to save the data on the clipboard?" ?

This keeps me from being able to save/close the spreadsheet in Access.

I assume I'd have to add something to disable the warning in Excel, but docmd. setwarning=false, does not work as it does in Access.
NateO
Hello,

how about running the following in your code?

xlApp.CutCopyMode = False

Where xlApp is your Excel Application Object Variable. You may want to post your code, though, there might be a better way...?
basson
That appears to work. Never would have found that one!
Thanks
NateO
You are welcome. sad.gif

Your Macro recorder, in Excel, will capture this when you record a copy, paste and hit your Esc key (to clear the clipboard) while recording. wink.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.