Announcement

Collapse
No announcement yet.

Stop Large Amount Of Data On Clipboard Message

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Stop Large Amount Of Data On Clipboard Message

    Need some help here... I have some code to open up another workbook, take the data from sheet1 in it, copy it to a sheet in the first book, and then close the opened workbook. My problem is that whenever it closes the workbook it gives me the large amount of data on clipboard window that I must then click 'No' on before it will proceed. I thought that making CutCopyMode = False would fix that, but it hasnt worked. Heres the bit of code that does this:

    Code:
    CutCopyMode = False
        Workbooks.Open Filename:= _
            "G:\Inventory\Inventory.xls"
        Range("A1:M500").Select
        Selection.Copy
        Windows("Inventory Report.xls").Activate
        Sheets("Vis-W").Select
        Cells.Select
        ActiveSheet.Paste
        Range("A1").Select
        Windows("Inventory.xls").Activate
        CutCopyMode = False
        ActiveWindow.Close
        Sheets("Main").Select

  • #2
    Re: Stopping Large Amount Of Clipboard Data Notification

    After you paste the data and before you close the workbook, can you copy say....cell A1 of a particular workbook, so that the data on the clipboard isn't large enough to warrant the message? It's cheesy and inefficient, but will probably work.

    Comment


    • #3
      Re: Stopping Large Amount Of Clipboard Data Notification

      Hello,

      How about:

      Code:
      Application.CutCopyMode = False
      instead of
      Code:
      CutCopyMode = False
      hth

      JL

      Comment


      • #4
        Re: Stopping Large Amount Of Clipboard Data Notification

        Mav - its dirty and ugly, but it works, cant believe I didnt think of it! Thanks!

        Comment


        • #5
          Re: Stopping Large Amount Of Clipboard Data Notification

          I prefer jlsprink's solution.

          Comment


          • #6
            Re: Stopping Large Amount Of Clipboard Data Notification

            Yup. I'm the king of duct taping a project together.

            I would also recommend jlsprink's method.

            Comment

            Working...
            X