DOWNLOAD
Code

Sub PlaceGraph()
Dim x As String, z As Range
Dim s As String
s = ActiveSheet.Name
Dim n As Integer
 n = InputBox(“Please choose chart number : “)
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(s).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 2″).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

?DienDan.Edu.Vn cám ơn bạn đã quan tâm và rất vui vì bài viết đã đem lại thông tin hữu ích cho bạn. https://diendan.edu.vn/

Rate this post

DienDan.Edu.Vn

DienDan.Edu.Vn Cám ơn bạn đã quan tâm và rất vui vì bài viết đã đem lại thông tin hữu ích cho bạn.
DienDan.Edu.Vn! là một website với tiêu chí chia sẻ thông tin,... Bạn có thể nhận xét, bổ sung hay yêu cầu hướng dẫn liên quan đến bài viết. Vậy nên đề nghị các bạn cũng không quảng cáo trong comment này ngoại trừ trong chính phần tên của bạn.
Cám ơn.

Đăng bình luận

(+84) (901) 369.468