Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6692967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:55:43+00:00 2026-05-26T05:55:43+00:00

I copy and paste several Excel graphs from Excel to Powerpoint using VBA: ‘copy

  • 0

I copy and paste several Excel graphs from Excel to Powerpoint using VBA:

'copy from excel worksheet
    Workbooks(Stats & ".xls").Worksheets(Stats).ChartObjects("graph4").Copy
'paste into powerpoint presentation
    .Slides(3).Shapes.Paste

' more code and more copy and pastes
' ...

Sometimes, copying the graphs fails. I have no explanation for this other than maybe memory problems.
The error message that I get:

Method ‘Copy’ of object ‘Chartobject’ failed.

Then Excel gets unresponsive and I have to restart it.

What can I do to prevent this?
Maybe I could clear the clipboard between the copy and paste operations?

Update:
I’ve tried the two mentioned ways to clear the clipboard. The copy & paste operation still fails from time to time. The run-time error is “-2147417848 (80010108)”.
There’s some info about this error on the net, so I’ll start over from there.

Update (Final):
I think I solved the problem by putting this code in front of the parts where the charts are copy and pasted. The error has not appeared again.

DoEvents 'lets the operating system clear / execute any backed up / queued events that it might have to execute.
'slow down the execution (to not get an error)
Workbooks(Stats & ".xls").Save
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T05:55:43+00:00Added an answer on May 26, 2026 at 5:55 am

    Trying putting Application.CutCopyMode = 0 between the copy and paste operations.

    0 or False means “Cancels Cut or Copy mode and removes the moving border”:
    http://msdn.microsoft.com/en-us/library/office/ff839532.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm a PHP/MySQL developer who hasn't used any form of versioning aside from copy/paste
I find it inconvenient using my browser to view JSON responses, then copy/paste the
I copy and paste code from this URL for creating and reading/writing a proc
If you copy and paste the following text in a html page, انوان you
When I try to copy code from eclipse and paste it in the actionscript
I see the need to copy and paste the following error handling code several
We need to stop copy paste of few characters like '<' or '>' or
How do you customize the Copy/Paste behavior in Visual Studio 2008? For example I
I am not a fan of boilerplate code: copy-paste reuse is potentially error-prone. Even
I'm trying to compress any given string to a shorter version, copy paste-able compressed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.