I need to copy and paste from one worksheet to another worksheet by using VBA. But there are some pictures in Column B, which I don't want to copy and paste to another worksheet column A. Part of my code is listed below. I need to add some code to exclude pictures, but don't know which one I should use. Please advise. Many thanks
我需要使用VBA从一个工作表复制并粘贴到另一个工作表。但是B列中有一些图片,我不想将其复制并粘贴到另一个工作表列A.我的部分代码如下所示。我需要添加一些代码来排除图片,但不知道应该使用哪一个。请指教。非常感谢
sh.Range("b" & i).Copy Destination:=Worksheets("Order List").Range("A" & j)
1 个解决方案
#1
3
If you don't want to copy any objects in that range, you could use:
如果您不想复制该范围内的任何对象,可以使用:
Application.CopyObjectsWithCells = False
' your copy code here
Application.CopyObjectsWithCells = True
#1
3
If you don't want to copy any objects in that range, you could use:
如果您不想复制该范围内的任何对象,可以使用:
Application.CopyObjectsWithCells = False
' your copy code here
Application.CopyObjectsWithCells = True