Can I insert an image and pass the file name of the image to a varaible?
Using macro recorder doesn't show anything involved with inserting an image.

Signature
Regards
XP Pro
Office 2007
Rick S. - 15 Apr 2008 18:33 GMT
I see that linking displays the file name in the Cell address box. Also
right clicking on the image and selecting "Size and Properties" will give
show the path and file name as one string under tab "Alt Text".
Can I access any of this information via VBE?

Signature
Regards
XP Pro
Office 2007
> Can I insert an image and pass the file name of the image to a varaible?
> Using macro recorder doesn't show anything involved with inserting an image.
Joel - 15 Apr 2008 18:34 GMT
The recorder will get picture if you use INSERT - Picture. The code below
lets you get a filename and then paste the picture.
filetoopen = Application _
.GetOpenFilename("Picture Files (*.jpg), *.jpg")
If filetoopen <> False Then
MsgBox "Open " & filetoopen
End If
ActiveSheet.Pictures.Insert(filetoopen).Select
> Can I insert an image and pass the file name of the image to a varaible?
> Using macro recorder doesn't show anything involved with inserting an image.
Rick S. - 15 Apr 2008 19:05 GMT
Perfect! Thanks Joel!

Signature
Regards
XP Pro
Office 2007
> The recorder will get picture if you use INSERT - Picture. The code below
> lets you get a filename and then paste the picture.
[quoted text clipped - 9 lines]
> > Can I insert an image and pass the file name of the image to a varaible?
> > Using macro recorder doesn't show anything involved with inserting an image.