Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default Determine path to picture displayed in image control

I know how to display a picture on the ActiveX image control, eg.
MyImage.Object.Picture = LoadPicture(strImagePath)

But does anyone know how to subsequently retrieve the image path from
the object? I've tried variations on
strImagePath = MyImage.Object.Picture
but without success.

FYI, I the images are in a worksheet and are being used to represent
various process operations. I'd prefer to keep track of what they are
through the image property rather than the name property since users
could copy/paste the objects resulting in a default xl generated name.

Thanks a lot,
Andrew
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Determine path to picture displayed in image control


Andrew;505210 Wrote:
I know how to display a picture on the ActiveX image control, eg.
MyImage.Object.Picture = LoadPicture(strImagePath)

But does anyone know how to subsequently retrieve the image path from
the object? I've tried variations on
strImagePath = MyImage.Object.Picture
but without success.

FYI, I the images are in a worksheet and are being used to represent
various process operations. I'd prefer to keep track of what they are
through the image property rather than the name property since users
could copy/paste the objects resulting in a default xl generated name.

Thanks a lot,
Andrew


I'm not going to be authoritative on this one, but I think the clue
lies in the word 'LoadPicture', that is, it loads the picture into excel
and doesn't maintain any sort of link to the original file.
I can't find any .tag property where this information might be stored
either.

However, if it's directly on a sheet it's a member of the shapes
collection for that sheet and so the AlternativeText property could hold
that info.

MyImage.Object.ShapeRange.AlternativeText = "C:\Documents ...
or
MyImage.ShapeRange.AlternativeText = "C:\Documents...
depending on just what you've Set MyImage to.

You'll need to assign the alternative text at the same time as
LoadPicture. Copy/pasting this keeps its AlternativeText property.

Does it have to be in an activex image control?


--
p45cal

*p45cal*
------------------------------------------------------------------------
p45cal's Profile: http://www.thecodecage.com/forumz/member.php?userid=558
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=138938

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default Determine path to picture displayed in image control

Thanks a lot - .AlternativeText will work perfectly for me - in fact I
don't need to know the full path just the object type name so storing
just that is actually preferable.

I went with the ActiveX image control because it gives me the option
of trapping a right click event and maybe displaying some options that
way (although undecided whether I'll actually go that route). Did you
have a better alternative in mind?

Cheers,
Andrew


On 28 Sep, 18:04, p45cal wrote:
Andrew;505210 Wrote:

I know how to display a picture on the ActiveX image control, eg.
MyImage.Object.Picture = LoadPicture(strImagePath)


But does anyone know how to subsequently retrieve the image path from
the object? *I've tried variations on
strImagePath = MyImage.Object.Picture
but without success.


FYI, I the images are in a worksheet and are being used to represent
various process operations. *I'd prefer to keep track of what they are
through the image property rather than the name property since users
could copy/paste the objects resulting in a default xl generated name.


Thanks a lot,
Andrew


I'm not going to be authoritative on this one, but I think the clue
lies in the word 'LoadPicture', that is, it loads the picture into excel
and doesn't maintain any sort of link to the original file.
I can't find any .tag property where this information might be stored
either.

However, if it's directly on a sheet it's a member of the shapes
collection for that sheet and so the AlternativeText property could hold
that info.

MyImage.Object.ShapeRange.AlternativeText = "C:\Documents ...
or
MyImage.ShapeRange.AlternativeText = "C:\Documents...
depending on just what you've Set MyImage to.

You'll need to assign the alternative text at the same time as
LoadPicture. Copy/pasting this keeps its AlternativeText property.

Does it have to be in an activex image control?

--
p45cal

*p45cal*
------------------------------------------------------------------------
p45cal's Profile:http://www.thecodecage.com/forumz/member.php?userid=558
View this thread:http://www.thecodecage.com/forumz/sh...d.php?t=138938


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
Picture Load in Image Control K[_2_] Excel Programming 0 July 22nd 09 11:18 AM
Programatically control picture property of Image control Brassman[_5_] Excel Programming 5 May 24th 05 09:32 PM
Copy picture from image control Ian[_14_] Excel Programming 4 February 8th 05 02:48 PM
changing image control's picture path No Name Excel Programming 2 October 5th 04 08:09 PM
Changing what is displayed in an image control programatically Eric Kehr Excel Programming 2 April 27th 04 08:16 AM


All times are GMT +1. The time now is 12:51 AM.

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

About Us

"It's about Microsoft Excel"