I have the following piece of code. Basically what it does is, copying a range as a picture, add a chart object, pasting the picture to the chart, saving the picture, then loading this newly saved picture on the form.
Everything works perfectly fine, besides the 'Paste' action that works perfect when debugging, but not in actual run.
I tried already each and all of the following, with no results:When debugging through, it takes a second for the paste to happen, so apparently, in runtime as soon it leaves the '.Chart.Paste' line to the DoEvents or Application.Wait line, I lost already the paste action.
- Application.Wait
- DoEvents
- Sleep (from the C runtime library)
Is there anything else to do to have the picture pasted and then proceed with the code?![]()
Please Login or Register to view this content.
Bookmarks