ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   LoadPicture workaround for Excel 2011 VBA for Mac (https://www.excelbanter.com/excel-programming/446056-re-loadpicture-workaround-excel-2011-vba-mac.html)

[email protected]

LoadPicture workaround for Excel 2011 VBA for Mac
 
Hello, I am having this problem too and am desperately looking for a fix and or workaround for a programming class. This is the applicable part of my code, I'm trying to take a graph that I have plotted on my sheet and upload it as a gif into a picture box on my user form. Any help would be appreciated,

Thanks,

Kevin

'put valujes in sheet
For i = 0 To N
Cells(i + 1, 1) = t(i)
Cells(i + 1, 2) = y(i)
Next

For i = 1 To ActiveSheet.ChartObjects.Count
ActiveSheet.ChartObjects(1).Delete
Next

'create a new chart
ActiveSheet.ChartObjects.Add(300, 100, 500, 300).Select
ActiveChart.ChartType = xlXYScatter

'plot graph
ActiveChart.SetSourceData Source:=ActiveSheet.Range(Cells(1, 1), Cells(N + 1, 2)), PlotBy:=xlColumns
ActiveChart.Legend.Select
Selection.Delete

'load graph to userform
ActiveChart.Export Filename:="/Users/khulik/Desktop tempchart123123.gif", FilterName:="GIF"
solutionimage.Picture = LoadPicture("/Users/khulik/Desktop tempchart123123.gif")


End Sub



All times are GMT +1. The time now is 03:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com