Sub test()
Dim w#, h#, flname$
With ActiveSheet
w = .[a1:f15].Width
h = .[a1:f15].Height
flname = "\abc.jpg" '根据需要修改
.[a1:f15].CopyPicture
With .ChartObjects.Add(0, 0, w + 0.75, h + 0.75).Chart
.Paste
.Export ThisWorkbook.Path & flname '根据需要修改
.Parent.Delete
End With
End With
End Sub
Sub test()
Dim w#, h#, flname$
With ActiveSheet
w = .[a1:f15].Width
h = .[a1:f15].Height
flname = "\abc.jpg" '根据需要修改
.[a1:f15].CopyPicture
With .ChartObjects.Add(0, 0, w + 0.75, h + 0.75).Chart
.Paste
.Export ThisWorkbook.Path & flname '根据需要修改
.Parent.Delete
End With
End With
End Sub