sirkülasyon
Altın Üye
- Katılım
- 10 Temmuz 2012
- Mesajlar
- 2,490
- Excel Vers. ve Dili
- 2021 LTSC TR
- Altın Üyelik Bitiş Tarihi
- 18-06-2026
Kod:
Private Sub CommandButton7_Click()
Dim sat As Long
If Empty = TextBox4 Then
MsgBox "TextBox4 değer girilmediği için işleminiz iptal edildi.", vbCritical
Exit Sub
End If
If Empty = TextBox5 Then
MsgBox "TextBox5 değer girilmediği için işleminiz iptal edildi.", vbCritical
Exit Sub
End If
If Empty = TextBox6 Then
MsgBox "TextBox6 değer girilmediği için işleminiz iptal edildi.", vbCritical
Exit Sub
End If
With Sheets("bordro")
sat = .Cells(65536, "A").End(xlUp).Row + 1
If sat > 31 Then
MsgBox "Satır doldu kayıt yapılmadı..!!", vbCritical, "UYARI"
Exit Sub
End If
.Cells(sat, "a").Value = TextBox2.Text
.Cells(sat, "b").Value = TextBox1.Text
.Cells(sat, "c").Value = TextBox3.Text
.Cells(sat, "d").Value = TextBox5.Text
.Cells(sat, "e").Value = TextBox4.Text
.Cells(sat, "f").Value = TextBox6.Text
.Cells(sat, "g").Value = Round(.Cells(sat, "d").Value * .Cells(sat, "e").Value * .Cells(sat, "f").Value, 2)
.Cells(sat, "h").Value = Round(.Cells(sat, "g").Value * 0.0066, 2)
.Cells(sat, "ı").Value = Round(.Cells(sat, "g").Value * 0.0066, 2)
.Cells(sat, "j").Value = Round(.Cells(sat, "g").Value - .Cells(sat, "ı").Value, 2)
MsgBox "KAYIT AKTARILDI", , "DESTEK"
For d = [b65536].End(3).Row To 1 Step -1
If WorksheetFunction.CountIf(Range("b5:b" & d), Cells(d, "b")) > 1 Then Rows(d).Delete
Next
MsgBox " Çift TC KİMLİK kaydı bulundu ve son girişiniz iptal edildi.", vbCritical, "MÜKERRER"
End With
Unload Me
End Sub
5 ve 31 satır arasına kayıt yapmasını 31 den büyükse satır dolu görüp kayıt yapmamasını istiyorum. Ancak boş satır olmasına rağmen "satır doldu" uyarısı ile kaydı engelliyor.
Nasıl düzeltebilirim?