VBA - Export Images from Excel with specific names as column / row

  • MODERATOR NOTICE: This topic has also been posted on other sites and may already have an answer elsewhere. Please take this into consideration when answering this question

    Dear all,


    We are looking forward a solution to export all images from one excel with name that can be created according the 1st line and 1st row.


    [Blocked Image: https://www.mrexcel.com/board/…/1614073190976-png.32823/]


    Attacked images like this

    [Blocked Image: https://www.mrexcel.com/board/…/1614073243903-png.32824/]


    I found a vba code that working but not exactly as we need it cause it working only by 1st column and also overwrite the photos.


    https://stackoverflow.com/ques…l-file-into-jpg-using-vba


  • Welcome to the Forum. Please read the Forum Rules to understand how the Forum works and why I have added Code Tags to your post


    All VBA code posted in the forum must be wrapped in code tags, which you omitted, including single-line code snippets.Be sure to use them in future posts.


    How to use code tags

    Note: no apostrophe in the tags, just used for demonstration here.

    ['code]


    your code goes between these tags


    ['/code]


    Or, just highlight all of the code and press the <> in the post menu above button to add the code tags.


    Thanks.

  • Hi PO,


    It is a little difficult to workout what you are trying to do exactly, I think from what you have described that you have all of your pictures in a single row? However it is not clear. If this is the case then you would wind up overwriting each file as the code you provided takes the name from the row of the picture and column A. It is not however clear how you do intend to name your files, where is the file name located in reference to the picture?


    An example sheet would of course help.

  • rory

    Changed the title of the thread from “Urgent - VBA - Export Images from Excel with specific names as column / row” to “VBA - Export Images from Excel with specific names as column / row”.
  • Hi PO,


    It is a little difficult to workout what you are trying to do exactly, I think from what you have described that you have all of your pictures in a single row? However it is not clear. If this is the case then you would wind up overwriting each file as the code you provided takes the name from the row of the picture and column A. It is not however clear how you do intend to name your files, where is the file name located in reference to the picture?


    An example sheet would of course help.

    Thank you for your time my friend.


    I was trying to export each image that attached in excel cell with the name "1st cell from same row and 1st cell from same column.

    For example if my image is on C10 then i want the filename of image : Row10 (1st cell) + C (1st cell) ,jpg


    For example gate_room10.jpg (see the 1st image of excel)


    I had around 10.000 photos to export from these excel files that each photo exist in different cell and must be renamed with 1st cell of column / 1st cell of row that each row contain detail information and each column contain room number.


    I found a solution to work around so please proceed and close the case.


    [Blocked Image: https://www.mrexcel.com/board/attachments/1614073190976-png.32823/]


    Kind regards

    Spyros