Emptying the Clipboard using Excel 2000 VBA

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Tom from Oakwood
    New Member
    • Sep 2006
    • 1

    Emptying the Clipboard using Excel 2000 VBA

    I'm writing VBA code in Excel 2000. I execute code which opens, one at a time, 10 Excel workbooks. It opens one, which does some manipulation of its own via a macro that executes upon opening, including copy / paste, then closes it and then saves it. Then it opens the next one, and so on. This process used to work fine until I modified the manipulation being done in each file to include a significant copy/paste task. Now when the file closes, I get the prompt "There is a large amount of data on the Clipboard. Do you want to be able to paste this information into another program later?" This message does not appear on the screen when I'm running as I use application.scr eenupdating = false, but causes a run time error because I can't see it to answer it. Is there a way I can empty the clipboard in my code before the file closes? Found a few suggestions on the web but none have worked, don't know if they were for Excel 2000. Or any other suggestions?
  • PEB
    Recognized Expert Top Contributor
    • Aug 2006
    • 1418

    #2
    Originally posted by Tom from Oakwood
    I'm writing VBA code in Excel 2000. I execute code which opens, one at a time, 10 Excel workbooks. It opens one, which does some manipulation of its own via a macro that executes upon opening, including copy / paste, then closes it and then saves it. Then it opens the next one, and so on. This process used to work fine until I modified the manipulation being done in each file to include a significant copy/paste task. Now when the file closes, I get the prompt "There is a large amount of data on the Clipboard. Do you want to be able to paste this information into another program later?" This message does not appear on the screen when I'm running as I use application.scr eenupdating = false, but causes a run time error because I can't see it to answer it. Is there a way I can empty the clipboard in my code before the file closes? Found a few suggestions on the web but none have worked, don't know if they were for Excel 2000. Or any other suggestions?
    Hi

    Why do not try to empty the clipboard using:


    Set MyData = New DataObject

    MyData.SetText ""
    MyData.PutInCli pboard

    or maybe the clipboard saves a copy from each item of each file that has been open!

    Meybe if you create an exe on VB that clears the clipboard and run it from Excel?

    Cheers...

    Comment

    Working...