|
代码:
Set rng = ThisWorkbook.Sheets("统计").Range("A1:G41")
' rng.Copy
rng.CopyPicture Appearance:=xlScreen, Format:=xlPicture '选区复制为图片
rng.CopyPicture xlScreen, xlBitmap '按位图复制不失真
With ThisWorkbook.ActiveSheet.ChartObjects.Add(0, 0, rng.Width + 1, rng.Height + 1).Chart
.ChartArea.Border.LineStyle = 0 '去除边框
.Parent.Select
.Paste '粘贴复制后的图片
.Export "D\test.png", "PNG"
.Parent.Delete '删除该图表
End With
什么原因啊,设断点,单步执行,图片会有,一但整体运行,保存的图片就是空白
用的excel 2010 怎么解决这问题
|
|