VBA Excel show Chart in Comment - EBOOK VBA EXCEL

EBOOK VBA EXCEL

EVBA.info ( Ebook VBA Excel ) Welcome EVBA.info - Nothing Is Unable ... About Excel Tricks, Learning VBA Programming, Dedicated Software, Free Courses, Living Skills ...

Sunday, May 12, 2019

VBA Excel show Chart in Comment

VBA Excel show Chart in Comment
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

📤You download App EVBA.info installed directly on the latest phone here : https://www.evba.info/p/app-evbainfo-setting-for-your-phone.html?m=1

No comments:

Post a Comment