use macro to set auto( about clipboard )

W

Wu

I write a macro, there will some data copy from a sheet1 to another sheet2,
and then , the sheet1 will be closed. while the macro is running, there is a
message to ask me some data in clipboard, will I use it. I will choose "NO"
manually everytime when the macro running.
How can I write something in macro to skip this message to let the macro
non-stop finish.
 
M

Mike H

Hi,

You can clear the clipboard with
Application.CutCopyMode=False

or you can use
Application.DisplayAlerts=False
'You code to close workbook
Application.DisplayAlerts=True

Either of which should suppress that message

Mike
 
G

Gord Dibben

Sub macroname()

your code to copy and paste

Application.CutCopyMode = False 'clears the clipboard

continue with your code.

End Sub


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top