Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / April 2008

Tip: Looking for answers? Try searching our database.

Insert image, get name of image

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rick S. - 15 Apr 2008 18:01 GMT
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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.