Dear friends,
Please be kindly requested to help me get over a problem in displaying charts (7 charts)as images in my userform .The problem is when navigating from image to image by using next and previous buttons I get this error "Invalid image 481" error and when debugging the cursor comes over this line which is highlited with yellow colour:
My function is as follows:
Could someone tell me where is the error ?
Please be kindly requested to help me get over a problem in displaying charts (7 charts)as images in my userform .The problem is when navigating from image to image by using next and previous buttons I get this error "Invalid image 481" error and when debugging the cursor comes over this line which is highlited with yellow colour:
Code:
[/COLOR][COLOR=#3E3E3E]Image1.Picture = LoadPicture(Fname)[/COLOR][COLOR=#3E3E3E]
My function is as follows:
Code:
[/COLOR][COLOR=#333333]Private Sub SaveChart() Dim MyChart As Chart
Dim Fname As String
Set MyChart = Sheets("Charts").ChartObjects(ChartNum).Chart
'MyChart.Parent.Width = 400
'MyChart.Parent.Height = 350
Fname = ThisWorkbook.Path & Application.PathSeparator & "temp.gif"
MyChart.Export Filename:=Fname, FilterName:="GIF"
' Show the chart
Image1.Picture = LoadPicture(Fname)
End Sub[/COLOR]
[COLOR=#333333]
Could someone tell me where is the error ?
Last edited: