Dear Friends,
I have Graph Named As “MM_CHART” on my worksheet i.e. “RC Category”
Same Graph I would like to load on my userfrom (image2) when it gets Initialized or Activated
Below is the VBA Code which I am trying to use it. But it doesn’t load the Chart into Userfrom Image2
Please suggest me an alternate code which suits my requirement!
Private Sub Load_Chart()
Dim sh As Worksheet
Dim myChart As Chart
Set sh = ThisWorkbook.Sheets("RC Category")
If IsNumeric(Me.TextBox11.Value) = True Then
Set myChart = sh.Shapes("MM_CHART").Chart
myChart.Export VBA.Environ("TEMP") & Application.PathSeparator & "MYCHART.jpg"
Me.Image2.Picture = LoadPicture(VBA.Environ("TEMP") & Application.PathSeparator & "MYCHART.jpg")
End If
End Sub
Private Sub UserForm_Activate()
Call Load_Chart
End Sub
Looking forward your valuable Suggestion!
Thanks & Regards,
Rajeshkumar R
Bookmarks