Error with copy/paste in excel 2010 VBA when trying to insert charts, ranges etc into word

前端 未结 4 1145
长发绾君心
长发绾君心 2021-01-18 16:39

In researching this error I\'ve come to the conclusion that it has to do with the clipboard not clearing like it should which wasn\'t an issue when we were using 2003 but is

4条回答
  •  醉梦人生
    2021-01-18 17:09

    I haven't confirmed this as a final solution, but the hang up seems to be when copying - The copied data never makes it onto the clipboard, so the code fails when attempting to paste. Clearing the clipboard of any previously copied data before initiating the next copy command seemed to help. I still am using the wait time shown above, but I seem to be able to get away with a shorter wait time using the following function to clear the clipboard:

    Application.CutCopyMode = False

提交回复
热议问题