Auto Answer message boxes


Posted by Phil Ridley on January 28, 2002 9:43 PM

Hi all,
After copying alot of data from a workbook, I close the workbook and excel asks what I want to do with the info in the clipboard (do I want to keep it for posting into some other document or dispose of it).

How do I auto answer this message box in an Excel Macro ?

Thanks in advance



Posted by Ivan F Moala on January 29, 2002 2:55 AM

You have to clear the clicboard by the method you
used to copy into.
Excel2K has a clipboard commandbar so....

Sub ClearClipboard01()
Application.CommandBars("Clipboard").Visible = True
Application.CommandBars("Clipboard").FindControl(ID:=3634).Execute
Application.CommandBars("Clipboard").Visible = False
End Sub

Otherwise......

Sub ClearClipboard02()
Application.CopyObjectsWithCells = False
Application.CutCopyMode = False
End Sub


Ivan