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.
Bookmarks