Results 1 to 2 of 2

Thread: Insert multiple images at once from a folder

  1. #1

    Insert multiple images at once from a folder

    Register for a FREE account, and/
    or Log in to avoid these ads!

    Good morning everyone!

    So I have taken this code from as it should be seen below.

    What I want to know is if anyone can help me with -

    1. Having all the photos import across 'Row B', instead of in a column fashion.
    2. And how to add the 'File Names' (i.e. excel_image2.jpg) of said images, above each of their image in 'Row A'.

    Thanks for all the help ahead of time!

    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
    Sub InsertPictures() 'Update 20140513 Dim PicList() As Variant Dim PicFormat As String Dim Rng As Range Dim sShape As Shape On Error Resume Next PicList = Application.GetOpenFilename(PicFormat, MultiSelect:=True) xColIndex = Application.ActiveCell.Column If IsArray(PicList) Then xRowIndex = Application.ActiveCell.Row For lLoop = LBound(PicList) To UBound(PicList) Set Rng = Cells(xRowIndex, xColIndex) Set sShape = ActiveSheet.Shapes.AddPicture(PicList(lLoop), msoFalse, msoCTrue, Rng.Left, Rng.Top, Rng.Width, Rng.Height) xRowIndex = xRowIndex + 1 Next End If End Sub

  2. #2
    Administrator Pecoflyer's Avatar
    Join Date
    Oct 2011
    Brussels Belgium
    Excel Version
    2010 on Xubuntu
    Hi and welcome
    Please do not crosspost your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.
    We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).
    Thank you Ken for this secure forum.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts