作者:绿色风
分类:
时间:2022-08-18
浏览:130
楼主 nothingwmm |
- Sub PlaceGraph()
- Dim x As String, z As Range
- Application.ScreenUpdating = False
- ‘assign a temporary location to hold the image
- x = “C:\XWMJGraph.gif”
- ‘assign the cell to hold the comment
- Set z = Worksheets(“ChartInComment”).Range(“A3”)
- ‘delete any existing comment in the cell
- On Error Resume Next
- z.Comment.Delete
- On Error GoTo 0
- ‘select and export the chart
- ActiveSheet.ChartObjects(“Chart 1”).Activate
- ActiveChart.Export x
- ‘add a new comment to the cell, set the size and insert the chart
- With z.AddComment
- With .Shape
- .Height = 322
- .Width = 465
- .Fill.UserPicture x
- End With
- End With
- ‘delete the temporary image
- Kill x
- Range(“A1”).Activate
- Application.ScreenUpdating = True
- Set z = Nothing
- End Sub
|
2楼 biaotiger1 |
mm一出手就是一大串的代码啊
加油! |
免责声明
有感于原ExcelTip.Net留存知识的价值及部分知识具有的时间限定性因素,
经与ExcelTip.Net站长Apolloh商议并征得其同意,
现将原属ExcelTip.Net的知识帖采集资料于本站点进行展示,
供有需要的人士查询使用,也慰缅曾经的论坛时代。
所示各个帖子的原作者如对版权有异议,
可与本人沟通提出,或于本站点留言,我们会尽快处理。
在此,感谢ExcelTip.Net站长Apolloh的支持,感谢本站点所有人**绿色风(QQ:79664738)**的支持与奉献,特此鸣谢!
------本人网名**KevinChengCW(QQ:1210618015)**原ExcelTip.Net总版主之一