Copypicture doesn' work with the cell range marked by numbers

妖精的绣舞 提交于 2019-12-14 03:05:14

问题


I'm working on a code which copies a range content to the clipboard as a picture. It works perfectly well when I use the letters and numbers to describe a range:

Call Worksheets("Traces_condenses").Range("A1:AC35").CopyPicture(xlScreen, xlPicture)

However, when I try to replace it with the range described by cell numbers, it fails with the app-defined or object-defined error (1004):

Call Worksheets("Traces_condenses").Range(Cells(1, 1), Cells(2, 1)).CopyPicture(xlScreen, xlPicture)

Could you please suggest me what I'm doing wrong? Thank you in advance, Jan

来源:https://stackoverflow.com/questions/59193463/copypicture-doesn-work-with-the-cell-range-marked-by-numbers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!