- Katılım
- 18 Ocak 2008
- Mesajlar
- 12,852
- Excel Vers. ve Dili
-
2003 excell türkçe
ve
2007 excell türkçe
Resimler sayfaya alınınca belli bir sayıdan sonra birazcık bekletmek gerekiyor herhaldeSayın Halit3 Hocam,
Şuna bir bakar mısınız, lütfen? A0100 e kadar A sütununa yazılmış ve resimler C:\Foto\ subdir inde. Silme çalıştı ama Ekle çalışmadı. Acaba nerede hata yap mışım?
İlginize çok teşekkür ederim.
Saygılarımla
kod:
Kod:
Sub resim_ekle()
son = 3
ReDim uzanti(son)
uzanti(1) = ".bmp"
uzanti(2) = ".jpg"
uzanti(3) = ".gif"
Klasor = ThisWorkbook.Path & "\Resimler\"
For i = 2 To Cells(Rows.Count, "A").End(3).Row
isim = Cells(i, 1).Value
Set Adres = Cells(i, 2)
Dim Picture As Object
For Each Picture In ActiveSheet.Shapes
yer = Cells(Picture.BottomRightCell.Row, Picture.BottomRightCell.Column).Address
yer1 = Adres.Address
If yer = yer1 Then
Picture.Delete
Exit For
End If
Next Picture
For j = 1 To son
Dosya = Klasor & isim & uzanti(j)
If CreateObject("Scripting.FileSystemObject").FileExists(Dosya) = True Then
ActiveSheet.Shapes.AddPicture Dosya, msoFalse, msoCTrue, Adres.Left + 2, Adres.Top + 2, Adres.Width - 4, Adres.Height - 4
ActiveSheet.Cells(i, 1).Select
[COLOR="Red"]sat1 = sat1 + 1
If sat1 = 50 Then
Application.Wait (Now + TimeValue("0:00:5"))
MsgBox "devam et"
sat1 = 0
End If[/COLOR]
Exit For
End If
Next
Next
End Sub