reference an ole image control's .Picture filename?

  • Thread starter Thread starter bdcrisp
  • Start date Start date
B

bdcrisp

I have several ole image controls in a worksheet im working on. I would
like to know the syntax for referring to this object's associated
Picture filename
(if i load "thisimage.bmp" into the picture property, it works, but
when i reference .Picture it displays a long integer value instead of
the path/filename im looking for)
 
How are you loading the image?

(Just a thought, don't you know the file you used as the source?).
 
im using this to initially load all the pictures:

sheets(1).myimage.object.picture = _
LoadPicture("path etc .bmp")

however, when a user clicks on an image
im having this new image 'set' to "clicked image". then, when the use
clicks another image, it replaces with the image clicked first.. do yo
understand?

i would like to say something like:
set oldObj = sheets(1).myoldimage
previousimage = oldObject.object.picture

set newObj = sheets(1).myimage
newObj.object.picture = _
LoadPicture(previousimage)

however.. here, the value of the previous image's .Picture is a lon
integer.. not a path and filename.. i need to reference the image'
path and filename for this progra
 
Just use something like:

Activesheet.Image3.Picture = Activesheet.Image2.Picture

I don't believe there is any link back to the original picture file (this
was used by loadpicture, but I don't see any property where it would be
retained).
 
Back
Top