Option Explicit
Sub Example()
  
  Dim shp As Shape
  Dim strFilename As String
  
  With Worksheets("Daten")
    
    strFilename = "c:\Bilder\" & .Cells(i, "J").Value & ".jpg"
    
    Set shp = CreatePictureAtCellPos(strFilename, .Range(3, "C"), 100, 100)
    
    '...
    
  End With
  
End Sub
Public Function CreatePictureAtCellPos( _
    Filename As String, Cell As Excel.Range, _
    Width As Single, Height As Single _
) As Shape
  
  'Fügt das Bild an der Zellposition in angegebene Breite und Höhe ein.
  'Es wird nur die Verknüpfung zum Bild gespeichert, das Bild selbst also nicht (so bleibt die Mappe schlank).
  Set CreatePictureAtCellPos = Cell.Worksheet.Shapes.AddPicture( _
                                  Filename, _
                                  LinkToFile:=True, _
                                  SaveWithDocument:=False, _
                                  Left:=Cell.Left, _
                                  Top:=Cell.Top, _
                                  Width:=Width, _
                                  Height:=Height)
  
End Function
	  
     |