Clear data from clipboard using VBA

T

tom

HI everyone

I am running a loop that gathers information from one workbook to another. I get a message asking if I want to save the inforamtion on the clipboard for further use. I don't want to save this information so how can I stop this from happening

For x = 0 To
m = b -
bb = Format(m, "yyyymmdd"
Sheets.Ad
ActiveSheet.Name = b
Range("A1").Selec
Set mybook = Workbooks.Open("Test - " & bb)

Sheets("Test1").Activat
Columns("b:f").Selec
Selection.Cop

Windows(newbook).Activat

Selection.PasteSpecial Paste:=xlValues, operation:=xlNone, skipblanks:=
False, Transpose:=Fals

mybook.Close Fals

Here is a portion of the loop that is causing the information to be placed on the clipboard. Is it possible to clear it with the pastspecial formula

Thank you for any insight you may have

Tom
 
F

Frank Kabel

Hi
try
...
Application.displayalerts = False
mybook.Close False
Application.displayalerts = True

Note: this does not clear the clipboard, just prevents the message
 

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