Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Weird and The Wonderful
  4. Not so much bad code as kludge

Not so much bad code as kludge

Scheduled Pinned Locked Moved The Weird and The Wonderful
xmlquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dalek Dave
    wrote on last edited by
    #1

    In an excel sub I have to copy and paste a large chunk of data from one workbook to another. On paste I need to close the workbook I copied from, and before I can it shows the message about a large amount of data on the clipboard. My work around?

    Selection.Copy
    Windows("Testbed.xlsm").Activate
    Range("A1").Select
    ActiveSheet.Paste
    Range("A1").Select
    Selection.Copy
    ActiveSheet.Paste
    Windows("test.xlsm").Activate
    ActiveWindow.Close
    

    Those two lines of copy/paste in the middle save the day, but really ought to be consigned to the dustbin of depression.

    ------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] Trolls[^]

    R 1 Reply Last reply
    0
    • D Dalek Dave

      In an excel sub I have to copy and paste a large chunk of data from one workbook to another. On paste I need to close the workbook I copied from, and before I can it shows the message about a large amount of data on the clipboard. My work around?

      Selection.Copy
      Windows("Testbed.xlsm").Activate
      Range("A1").Select
      ActiveSheet.Paste
      Range("A1").Select
      Selection.Copy
      ActiveSheet.Paste
      Windows("test.xlsm").Activate
      ActiveWindow.Close
      

      Those two lines of copy/paste in the middle save the day, but really ought to be consigned to the dustbin of depression.

      ------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] Trolls[^]

      R Offline
      R Offline
      Reiss
      wrote on last edited by
      #2

      Can you not use Application.DisplayAlerts = False before your copy and then Application.DisplayAlerts = True once your paste has completed?

      D 1 Reply Last reply
      0
      • R Reiss

        Can you not use Application.DisplayAlerts = False before your copy and then Application.DisplayAlerts = True once your paste has completed?

        D Offline
        D Offline
        Dalek Dave
        wrote on last edited by
        #3

        FacePalm! I knew there had to be a better way.

        ------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] Trolls[^]

        U 1 Reply Last reply
        0
        • D Dalek Dave

          FacePalm! I knew there had to be a better way.

          ------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] Trolls[^]

          U Offline
          U Offline
          User 2558377
          wrote on last edited by
          #4

          Also try Application.CutCopyMode = False

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups