+ Reply to Thread
Results 1 to 3 of 3

Problem with vba that copies ranges to Powerpoint

  1. #1
    Registered User
    Join Date
    10-23-2012
    Location
    Norway
    MS-Off Ver
    Excel 2010
    Posts
    4

    Problem with vba that copies ranges to Powerpoint

    Hi. I'm having some trouble with a macro that copies two ranges from excel and paste it into Powerpoint.

    I have a sheet where you can enter a value and the plots on the sheet is updated.
    A macro is run automatically when the value changes.

    The vba to copy to powerpoint loops through several values and the sheet is updated, "automatic" macro run and the ranges are copied to powerpoint.
    It works fine for some iterations, and then randomly it gives the error:
    "Run-time error '1004': CopyPicture method of Range class failed

    I tried changing CopyPicture to Copy, but then I just get the error:
    "Shapes.PasteSpecial: Invalid request. The specified data type is unavailable."

    I have a feeling it could either not be done calculating, or the automatic macro is not done in the background?
    It does not happen at a specific value, but seems random each time.

    The VBA is below. Would greatly appreaciate any help.

    Please Login or Register  to view this content.
    Last edited by thorbjorn; 06-14-2016 at 06:20 PM.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Problem with vba that copies ranges to Powerpoint

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    10-23-2012
    Location
    Norway
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Problem with vba that copies ranges to Powerpoint

    Sorry about that. Tried to fix the formatting now.

+ 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 Convert Excel Graphs into the PowerPoint Slides for specified ranges
    By ctguards1987 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-14-2014, 09:08 AM
  2. Replies: 1
    Last Post: 05-14-2014, 09:08 AM
  3. Powerpoint VBA that copies Excel worksheet
    By daintysal in forum PowerPoint Formatting & General
    Replies: 0
    Last Post: 12-06-2012, 08:58 AM
  4. Replies: 2
    Last Post: 12-05-2012, 10:43 PM
  5. Replies: 0
    Last Post: 07-23-2012, 06:22 AM
  6. Pasting Selected Ranges into a PowerPoint Slides
    By NaNaBoo in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 04-02-2009, 10:58 AM
  7. excel to powerpoint- misalignment of ranges
    By k2sarah in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 02-20-2006, 09:25 AM

Tags for this Thread

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