Sub Auto_Open()
10 For i = 2 To 150
DoEvents
If Not IsEmpty(Sheets("VERİLER").Cells(i, 5).Value) Then
basla = Timer
While (Timer - basla) < 1
DoEvents
Sheets("VERİLER").Range("H3").Value = Format(Time, "hh:mm:ss")
Wend
While (Timer - basla) < 3
DoEvents
Sheets("VERİLER").Range("K2").Value = Sheets("VERİLER").Cells(i, 4).Value
Wend
End If
Next i
GoTo 10
End Sub
Sub Auto_Open()
On Error Resume Next
Dim foto As Shape, bak As Boolean
For Each foto In ActiveSheet.Shapes
If InStr(1, foto.Name, "Picture") > 0 Then
foto.Delete
End If
Next foto
10 For i = 2 To 150
DoEvents
If Not IsEmpty(Sheets("VERİLER").Cells(i, 5).Value) Then
basla = Timer
While (Timer - basla) < 1
DoEvents
Sheets("VERİLER").Range("H3").Value = Format(Time, "hh:mm:ss")
Wend
DoEvents
While (Timer - basla) < 3
DoEvents
Sheets("VERİLER").Range("K2").Value = Sheets("VERİLER").Cells(i, 4).Value
DoEvents
On Error GoTo 30
On Error GoTo -1
If bak = False Then
Application.ScreenUpdating = False
For Each foto In ActiveSheet.Shapes
If InStr(1, foto.Name, "Picture") > 0 Then
foto.Delete
End If
Next foto
bak = True
Range("E9").Select
ActiveSheet.Pictures.Insert(ThisWorkbook.Path & "\" & Sayfa1.Range("K11").Value & ".jpg").Select
DoEvents
40 With Selection.ShapeRange.Line
.Visible = msoTrue
.Weight = 6
End With
DoEvents
With Selection.ShapeRange.Line
.Visible = msoTrue
.ForeColor.ObjectThemeColor = msoThemeColorText2
.ForeColor.TintAndShade = 0
.ForeColor.Brightness = 0
.Transparency = 0
End With
DoEvents
Selection.ShapeRange.ScaleWidth 0.835, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleHeight 0.835, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleWidth 0.8122605965, msoFalse, msoScaleFromBottomRight
DoEvents
Range("F15").Select
bak = False
Application.ScreenUpdating = True
End If
Wend
End If
Next i
GoTo 10
30
a = 5
ActiveSheet.Pictures.Insert(ThisWorkbook.Path & "\yok.jpg").Select
If a = 5 Then GoTo 40
End Sub
Veriler sayfasında isim ve sınıf altına o öğrencinin numarasını da getirmiştim. Resim adları okul no'ya göre çünkü..Denedim fakat resim yok hep kalıyor.
=DOLAYLI(ADRES(KAÇINCI($K$2;F:F;0);2))