- Katılım
- 28 Mart 2007
- Mesajlar
- 107
- Excel Vers. ve Dili
- frontpage
ekteki dosyada yapılan açıklamalar doğrultusunda kod geliştirebilirmisiniz.Şimdden teşekkürler.
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub VeriSüz1()
Dim a As Variant
Dim b As Variant
Dim c As Variant
Dim d As Variant
'***************************************************
Sheets("ÖZET").Unprotect "1968"
Sheets("ÜST YAZI(1)").Unprotect "1968"
'***************************************************
Sheets("ÜST YAZI(1)").Select
For Each t In Range("g25:g124").Cells
If t.Value = "" Then 'boş hücreleri gösterir
t.EntireRow.Hidden = False
End If
Next t
Range("A25:g124").ClearContents
'VAR OLAN KISMI TEMİZLER
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
Selection.Borders(xlEdgeTop).LineStyle = xlNone
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
Selection.Borders(xlEdgeRight).LineStyle = xlNone
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Selection.Interior.ColorIndex = 35
Range("A24:g24").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
'**************************************
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideHorizontal)
Range("A25").Select
End With
'********************************************
Sheets("ÖZET").Select
b = InputBox("Devamsızlık yapan öğrencinin numarasını yazınız.")
a = 2003
If b = "" Then Exit Sub
Range("K2").Select
Selection.AutoFilter Field:=11, Criteria1:=b
'>>>> öğrenci numarasının listede olup olmadığını kontrol eder yoksa işlemi sonlandırır.
If Application.WorksheetFunction.Subtotal(102, [k3:k1000]) = 0 Then
MsgBox b & " öğrenci numarasına sahip öğrenci bulunamadığından işleminize devam edemiyorum!"
Exit Sub
End If
Range("A3:G" & a).Select
'öğrenci no yok ise hata vertiyor
Selection.SpecialCells(xlCellTypeVisible).Select
Selection.Copy
Sheets("ÜST YAZI(1)").Select
Range("A25").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
'*******************************************************************
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
'***********************************************
Sheets("ÖZET").Select
Selection.AutoFilter Field:=11
Sheets("ÜST YAZI(1)").Select
Range("t25") = b
d = InputBox("Evrakın Numarasını Yazınız.")
Sheets("ÜST YAZI(1)").Select
Range("c6") = d
'*************************boş hücreleri gizler
'*************************boş hücreleri gizler
'*************************boş hücreleri gizler
Sheets("ÜST YAZI(1)").Select
For Each t In Range("g25:g122").Cells
If t.Value = "" Then
t.EntireRow.Hidden = True
End If
Next t
Range("A1").Select
'SATIRLARI GİZLER
Sheets("ÜST YAZI(1)").Rows("126:65536").EntireRow.Hidden = True
'SÜTUNLARI GİZLER
Sheets("ÜST YAZI(1)").Columns("L:ıv").EntireColumn.Hidden = True
'****************************************SAYFALARA ŞİFRE KOYAR
Sheets("ÖZET").Protect "1968", DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingColumns:=True, AllowFormattingRows:=True, AllowFiltering _
:=True
ActiveSheet.EnableSelection = xlNoRestrictions
Sheets("ÜST YAZI(1)").Protect "1968", DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingColumns:=True, AllowFormattingRows:=True
End Sub