LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 153
Default LoadPicture() error XL2007

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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Code OK in XL2003 but Run-time error '1004' in xl2007 Ken Johnson Excel Programming 0 July 22nd 09 01:00 PM
LoadPicture fails kirkm[_8_] Excel Programming 3 April 17th 09 04:28 AM
LoadPicture compile error Jim[_7_] Excel Programming 1 December 20th 07 11:17 PM
LoadPicture for a ControlButton help micmacuk Excel Programming 7 May 30th 06 08:44 PM
LoadPicture - how to keep .jpg compression No Name Excel Programming 0 May 25th 04 08:14 AM


All times are GMT +1. The time now is 09:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"