Currently I'm using the following code to export my diagram as JPG and save it in the worksheet directory.
Sub exportDiagram_Click()
Dim myChart As Chart
Dim filePath As String
Set objChrt = Sheets("Diagrams").ChartObjects("dashboardExport")
Set myChart = objChrt.Chart
filePath = ThisWorkbook.Path & "\export.jpg"
myChart.Export Filename:=filePath, Filtername:="JPG"
End Sub
Since I uploaded this Excel file to Sharepoint my code doesn't work anymore.
How do I create this JPG file and upload it to Sharepoint from Excel?
Thanks