Hello,
I know my error must be easy to spot, but I've tried everything I know. I literally only have a command button and an Image in the Form and a simple graph in Excel. I want my "1 Gráfico" chart to appear in Image1 when I press the button (I'm spanish, that's why it's called like that ), but I get error 438 in the chartObject line, please help!
Thank youuu
I know my error must be easy to spot, but I've tried everything I know. I literally only have a command button and an Image in the Form and a simple graph in Excel. I want my "1 Gráfico" chart to appear in Image1 when I press the button (I'm spanish, that's why it's called like that ), but I get error 438 in the chartObject line, please help!
Code:
Private Sub CommandButton1_Click()
Dim fname As String
Dim cchart As Chart
Set cchart = Worksheets("Hoja1").ChartObject("1 Gráfico").Chart
fname = "G:/temp.gif"
cchart.Export Filename = fname, Filtername:="gif"
Image1.Picture = LoadPicture(fname)
End Sub
Thank youuu