D
Dave Unger
Hello,
I have an ActiveX image control (“stuGraphic”) on a worksheet
“wsStudent”.
The following line of code is run from a macro:
wsStudent.OLEObjects("stuGraphic").Object.Picture = LoadPicture()
Running with XL2007, this runs without fail 95% of the time, but
occasionally it generates an error message ‘Runtime error-2147417848
(80010108) Method “Picture” of object “IImage” failed.’ Once I get
the error, it fails continually - restarting the application, or
closing & restarting Excel does not fix the problem. The only fix
I’ve found to date (besides re-booting the computer) is to start up an
identical backup of the application, which runs without error. Now,
when I go back to the original, it runs without a hitch.
I’ve been playing with this for days, but can’t replicate the error,
it just seems to occur without warning. I’ve set up this line in a
test loop, it will run for hours without failing. I’m starting to
suspect a memory leak of some kind in my main application.
Oddly enough (maybe not), I’ve yet to have a failure running the same
code under XL2003.
If anyone can shed some light on this, I’d be most appreciative.
Thanks in advance.
Regards,
DaveU
I have an ActiveX image control (“stuGraphic”) on a worksheet
“wsStudent”.
The following line of code is run from a macro:
wsStudent.OLEObjects("stuGraphic").Object.Picture = LoadPicture()
Running with XL2007, this runs without fail 95% of the time, but
occasionally it generates an error message ‘Runtime error-2147417848
(80010108) Method “Picture” of object “IImage” failed.’ Once I get
the error, it fails continually - restarting the application, or
closing & restarting Excel does not fix the problem. The only fix
I’ve found to date (besides re-booting the computer) is to start up an
identical backup of the application, which runs without error. Now,
when I go back to the original, it runs without a hitch.
I’ve been playing with this for days, but can’t replicate the error,
it just seems to occur without warning. I’ve set up this line in a
test loop, it will run for hours without failing. I’m starting to
suspect a memory leak of some kind in my main application.
Oddly enough (maybe not), I’ve yet to have a failure running the same
code under XL2003.
If anyone can shed some light on this, I’d be most appreciative.
Thanks in advance.
Regards,
DaveU