Hello
Guys

I'm having troubles to show properly the charts into a form.
I have 11 charts.
I already tried different ways. I am machine the vba code works fine, but when another user tries to access via OneDrive. I got the error message.



Private Sub UpdateChart()    
    'Save the chart in the GIF format
    'Fname = ThisWorkbook.Path & Application.PathSeparator & "temp.gif"
    FName = CreateObject("WScript.Shell").SpecialFolders("Desktop") & "\temp_chart.jpg"
    
    'On Error Resume Next
    'On Error GoTo 0
    
    Set CurrentChart = Sheets(".").ChartObjects(ChartNum).Chart
    
    CurrentChart.Parent.Width = 670
    CurrentChart.Parent.Height = 360
    
    CurrentChart.Export Filename:=FName, FilterName:="jpg"
    
    '   Load the chart to the form
    Image1.Picture = LoadPicture(FName)
    
End Sub