+ Reply to Thread
Results 1 to 2 of 2

Checking to see if an object is ready for copy and paste.

  1. #1
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Checking to see if an object is ready for copy and paste.

    I am using the technique I outlined in this article: https://www.excelforum.com/tips-and-...int-xl2pp.html.

    This application works perfectly when all the data that is needed to transfer to PowerPoint is already calculated.

    I am now working on an application where I am computing the values "on the fly." I am running into errors with copying and pasting ranges and charts as pictures into the PowerPoint. I suspect that I'm overrunning the application. I'm trying to copy something while it is still being calculated. I added some doevents into the code and they don't seem to help. So I added some timing loops. This slows down the application.

    I was wondering if there is a more elegant solution: some way to test if an object is ready to copy. Then if it isn't, I'll apply the time delay only then.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Checking to see if an object is ready for copy and paste.

    I came up with this and it seems to work. The code was failing either on the copy or the paste. So I inserted a named location:

    TryAgain:

    before the copy section of the code and put in: On Error goto TryAgain.

    I turn if off after the paste: On Error goto zero.

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to create print-ready copy of sheet (only copy if non empty)
    By AleXSR700 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-30-2021, 06:23 AM
  2. Application/Object defined error on copy/paste
    By radddogg in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-09-2020, 08:05 AM
  3. [SOLVED] copy and paste object random failures
    By muss1210 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-05-2019, 05:43 AM
  4. [SOLVED] VBA Code: Copy paste from list object to other list object based on criteria
    By Ratu in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 02-21-2017, 10:05 PM
  5. Checking 2 cells, copy and paste from the right side cell when equal.
    By martinest in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-23-2015, 04:47 AM
  6. Replies: 1
    Last Post: 07-19-2013, 02:18 PM
  7. Replies: 3
    Last Post: 10-02-2012, 06:17 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1