-
Excel 2010 chart's error
Hello all,
I use a code to export a chart object to a file:
[VBA]Sub CarregarFigura(img, sGráfico As String)
Dim sArquivo As String
sArquivo = ThisWorkbook.Path & "\temp.bmp"
Sheets("Gráficos").ChartObjects(sGráfico).Chart.Export Filename:=sArquivo, FilterName:="BMP"
With img
.Picture = LoadPicture(sArquivo)
End With
Kill sArquivo
End Sub[/VBA]
I get an error 481: Invalid picture (translated from portuguese) at line:
[VBA] .Picture = LoadPicture(sArquivo)
[/VBA]
Well, when I go to the sheet that has the charts and CLICK them manually, one by one, the same code works thereafter. Anyone had this issue ever?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules