Results 1 to 13 of 13

Insert multiple Photos MACRO

Threaded View

  1. #1
    Registered User
    Join Date
    05-28-2010
    Location
    ny
    MS-Off Ver
    Excel 2007
    Posts
    4

    Insert multiple Photos MACRO

    Hello all,
    I use the following macro (found it in a forum) below to insert photos in Column A of my worksheet and it works great!
    But I need a MACRO that will load hundreds of photos all down Column A. what code needs to be added in order for that to work? Im just a novice and have been searching for a Macro I can copy that will let me load hundreds of photos automatically. Thank you!!

    Sub InsertPicture()
    Dim sPicture As String, pic As Picture
     
    sPicture = Application.GetOpenFilename _
        ("Pictures (*.gif; *.jpg; *.bmp; *.tif), *.gif; *.jpg; *.bmp; *.tif", _
         , "Select Picture to Import")
     
    If sPicture = "False" Then Exit Sub
     
    Set pic = ActiveSheet.Pictures.Insert(sPicture)
    With pic
        .ShapeRange.LockAspectRatio = msoFalse
        .Height = ActiveCell.Height
        .Width = ActiveCell.Width
        .Top = ActiveCell.Top
        .Left = ActiveCell.Left
        .Placement = xlMoveAndSize
    End With
     
    Set pic = Nothing
     
    End Sub
    Last edited by yazl; 05-30-2010 at 01:16 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1