Hi
i have the following code which will insert a graph on an image box on a form in Excel 2003.
i have the following code which will insert a graph on an image box on a form in Excel 2003.
Code:
Public Sub UserFormChart()
fname = ThisWorkbook.Path & "\ Ch.gif"
Set ch = Sheets("Data").ChartObjects(1).Chart
ch.Export fname, "Gif"
UserForm1.Image1.Picture = LoadPicture(fname)
Kill fname
UserForm1.Show
End Sub
I am getting the follwoing error "Sub or Function not defined" on the "LoadPicture(fname)" when compiling.
Do i need to make a reference to a DLL if so which one? I take it the loadPicture is a vba function correct me if i am wrong.
Any help would be much appreciated.
Thanks
Mo