单元格区域另存为图片.docxVIP

  • 6
  • 0
  • 约小于1千字
  • 约 1页
  • 2021-01-13 发布于山东
  • 举报
单元格区域另存为图片 如何把工作表区域另存为图片,研究了一个小时,终于把代码完成,希望大家喜欢。 Sub SheetOutJpg() Dim Newshape As Shape Selection.CopyPicture Appearance:=xlScreen, Format:=xlPicture ActiveSheet.Paste Set Newshape = ActiveSheet.Shapes(ActiveSheet.Shapes.Count) With ActiveSheet.ChartObjects.Add(1, 1, 1, 1) .Width = Newshape.Width .Height = Newshape.Height Newshape.Copy .Chart.Paste .Chart.Export ActiveWorkbook.Path \Myjpg.jpg .Delete End With Newshape.Delete MsgBox 恭喜 ! 图片已生成并存放在 ActiveWorkbook.Path End Sub

文档评论(0)

1亿VIP精品文档

相关文档