I'm using Excel 2010 (14.0.???), 2013 (15.0.4797.1003) and Excel 2016 (16.0.6568.2025) on three independent
PCs.
For ease in reproducing the issue, I start with a blank worksheet, and enter "1" into cell A1 of
Sheet1. I then create this macro:
Sub Test()
Dim x As Long
For x = 1 To 100
Range("A1:A1").CopyPicture
Next x
End Sub
When I run macro Test in Excel 2010, it never halts with an error... x always reaches 100.
When I run macro Test in Excel 2013 or 2016, it halts with "CopyPicture method
of Range class failed". x has a random value, but somewhere between 5 and 10 is typical.
BUT THIS ONLY STARTED TO OCCUR in Excel 2013 and 2016 in the past few weeks. The real macro is much more complex,
but the trivial macro leads me to think some auto update of Excel has suddenly broken CopyPicture!
I've just discovered if I add a one second delay inside the loop it works properly:
Application.Wait (Now + TimeValue("0:00:01"))
Our company relies on this method many times in a day. Any ideas would be greatly appreciated.