DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub resimyukle()
sonsatir = Cells(Rows.Count, "A").End(3).Row
For i = 1 To sonsatir
Set resimhcr = Cells(i, "B")
For Each silinecek In ActiveSheet.Pictures
If Not Intersect(silinecek.TopLeftCell, resimhcr) Is Nothing Then
silinecek.Delete
End If
Next
yol = "D:\Deneme\resimler\"
dosya = yol & Cells(i, "A").Value & ".jpg"
If dosyavarmi(dosya) Then
Set resimatama = ActiveSheet.Shapes.AddPicture(dosya, True, True, resimhcr.Left, resimhcr.Top, resimhcr.MergeArea.Columns.Width, resimhcr.MergeArea.Rows.Height)
End If
Next i
End Sub
Function dosyavarmi(dosya)
Dim ds, a
Set ds = CreateObject("Scripting.FileSystemObject")
a = ds.FileExists(dosya)
If a = True Then
dosyavarmi = True
Else
dosyavarmi = False
End If
End Function