Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default LoadPicture compile error

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?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default LoadPicture compile error


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"

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?


Reply
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
help with this error-Compile error: cant find project or library JackR Excel Discussion (Misc queries) 2 June 10th 06 09:09 PM
conditional compile for LoadPicture? RB Smissaert Excel Programming 2 March 27th 06 04:37 PM
VBAProject name compile error, not defined at compile time Matthew Dodds Excel Programming 1 December 13th 05 07:17 PM
error message: compile error, argument not optional Pierre via OfficeKB.com Excel Programming 3 September 5th 05 03:45 PM


All times are GMT +1. The time now is 05:26 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"