ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   reference an ole image control's .Picture filename? (https://www.excelbanter.com/excel-programming/286737-reference-ole-image-controls-picture-filename.html)

bdcrisp[_22_]

reference an ole image control's .Picture filename?
 
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)


---
Message posted from http://www.ExcelForum.com/


Tom Ogilvy

reference an ole image control's .Picture filename?
 
How are you loading the image?

(Just a thought, don't you know the file you used as the source?).

--
Regards,
Tom Ogilvy

bdcrisp wrote in message
...
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)


---
Message posted from http://www.ExcelForum.com/




bdcrisp[_23_]

reference an ole image control's .Picture filename?
 
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

--
Message posted from http://www.ExcelForum.com


Tom Ogilvy

reference an ole image control's .Picture filename?
 
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).
--
Regards,
Tom Ogilvy


bdcrisp wrote in message
...
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 user
clicks another image, it replaces with the image clicked first.. do you
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 long
integer.. not a path and filename.. i need to reference the image's
path and filename for this program


---
Message posted from http://www.ExcelForum.com/





All times are GMT +1. The time now is 02:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com