LoadPicture compile error

J

Jim

I can't figure out what is wrong with this line of code:

Image1.Picture = LoadPicture(sFileName)

This is in Excel 2000.

I get "Compile Error: Sub or function not defined," and LoadPicture is
highlighted. sFileName is a variable with a valid, complete path. This
worked early yesterday, now it won't. I did a lot of programming after and
today. What have I done to mess this up?
 
J

Jim Cone

Is the Image control on a userform?
Is the code in the form module?
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"Jim"
<[email protected]>
wrote in message
I can't figure out what is wrong with this line of code:

Image1.Picture = LoadPicture(sFileName)

This is in Excel 2000.
I get "Compile Error: Sub or function not defined," and LoadPicture is
highlighted. sFileName is a variable with a valid, complete path. This
worked early yesterday, now it won't. I did a lot of programming after and
today. What have I done to mess this up?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top