Microsoft Excel - Clipboard issues - Asked By Dan on 15-Dec-11 10:01 AM

I am copying and pasting alot of data from one worksheet to another in the same workbook, and the clipboard is getting full and causing an error.  I have tried "Application.CutCopyMode = False" after each paste method, but it does not clear the clipboard.  Then I have tried not to use the clipboard by using "January.Range("A:AL").Copy Destination = JanChart.Range("AA1:BL1048576").Paste" but it does not paste any thing into JanChart sheet at AA1.  any suggeations on how to do this?

Dan
John D replied to Dan on 15-Dec-11 10:27 AM
Hi Dan
Could you post your code because what you are showing is not a true picture , i think you have a syntax error but
would need to see the real script.
John
Dan replied to John D on 15-Dec-11 11:32 AM
I do this for all 12 months.  You will notice when it autofilters, I cannot show what files I am autofilter, sorry.  Anyway this leaves alot on the clipboard.


Sub DataToChart()

'   ===========================================================================================

Sheets("January").Select


    On Error Resume Next
    Application.DisplayAlerts = False

    Range("A1").Select
    If Range("A1") = "" Then
    Else
   
    Cells.Select
      Selection.AutoFilter
  
    ActiveSheet.Range("$A$1:$AL$44815").AutoFilter Field:=36, Criteria1:=Array(several file names, cannot show), Operator:= xlFilterValues
     
    Columns("A:AL").Select
    Selection.Copy
   
    Sheets("JanChart").Select
    Range("AA1").Select
    ActiveSheet.Paste

    Application.CutCopyMode = False   ' issue will not clear clipboard
   
    Range("A1").Select
   
    Sheets("January").Select
    Selection.AutoFilter
    Range("A1").Select
   
   
End If

John D replied to Dan on 15-Dec-11 11:38 AM
Dan
Try this:
Place your " Application.CutCopyMode = False" on top before you start copying
Jitendra Faye replied to Dan on 16-Dec-11 01:47 AM
Clear clipboard.


  1. If the Microsoft Office Clipboard is not displayed in the task pane, click Office Clipboard on the Edit menu.
  2. On the Clipboard task pane, do one of the following:
    • To clear one item, click the arrow next to the item you want to delete, and then click Delete Button image.
    • To clear all items, click Clear All Button image.

Try this and let me know.