Hello!

I have a function that loads data from a file, then creates new file on disk (JPEG picture) and loads picture. But there comes to error. The function looks like that:

Funciton GetPic(id as string) as StdPicture
'''
''' Some other code
'''
Set GetPic = LoadPicture(app.path & "\File.jpg")
End Function

Then when I try to set LoadPicture to my function it returns error.

Can anyone explain me why?