• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Extract Name of image for Excel 2013

Arun Mani A

New Member
Hi,

I have used this code for MS Excel 2007 version for getting names of pictures or images i have inserted in excel sheet. Now this code is not working in Excel 2013.

Please help out.

Regards

Arun

Code:
Sub a()
Dim Pic As Picture
Dim Counter As Integer
For Each Pic In ActiveSheet.Pictures
Counter = Counter + 1
Cells(Counter, 1).Value = Pic.Name
Cells(Counter, 2).Value = Pic.ShapeRange.AlternativeText
Cells(Counter, 3).Value = Pic.PrintObject


Next
End Sub

MOD EDIT: ADDED CODE TAGS
 
Last edited by a moderator:
Thanks chirayu for the reply, but i am not getting the name of the picture, attached snaphot.
 

Attachments

  • Extract names.jpg
    Extract names.jpg
    218.5 KB · Views: 10
Have you renamed the pictures first? seems like you have just inserted them in Excel.

Excel does not retain image names if you do Insert > Pictures. Doing that, the names default to Picture1, Picture2 etc.

To rename an image, once you insert it, click on the image & rename from top left and then run macro

upload_2017-10-24_13-51-38.png
 
Back
Top