Bu yapıda ki kodlamaya mükerrer kayıt uyarısı verdirip kaydetmemeyi nasıl yaptırabiliriz.Teşekkürler
Dim SonSatır As Variant
Private Sub CommandButton1_Click()
If TextBox1 <> "" And TextBox2 <> "" And TextBox3 <> "" Then
If IsNumeric(TextBox3.Value) Then
SonSatır = WorksheetFunction.CountA(Worksheets("personel").Range("A:A")) + 1
If SonSatır = 2 Then
Worksheets("PERSONEL").Cells(SonSatır, 1) = 1
Worksheets("PERSONEL").Cells(SonSatır, 2) = TextBox1.Value
Worksheets("PERSONEL").Cells(SonSatır, 3) = TextBox2.Value
Worksheets("PERSONEL").Cells(SonSatır, 4) = TextBox3.Value
TextBox1 = ""
TextBox2 = ""
TextBox3 = ""
Else
Worksheets("PERSONEL").Cells(SonSatır, 1) = Worksheets("personel").Cells(SonSatır - 1, 1) + 1
Worksheets("PERSONEL").Cells(SonSatır, 2) = TextBox1.Value
Worksheets("PERSONEL").Cells(SonSatır, 3) = TextBox2.Value
Worksheets("PERSONEL").Cells(SonSatır, 4) = TextBox3.Value
TextBox1 = ""
TextBox2 = ""
TextBox3 = ""
MsgBox "KAYIT YAPILDI", vbOKOnly + vbInformation, "Veri Kaydedildi"
End If
Else
MsgBox "SİCİLNO YA RAKAM GİRİNİZ"
GoTo SoN
End If
Else
MsgBox " İLGİLİ ALANLARI DOLDURUNUZ"
SoN:
End If
Adı Soyadı:
Fa.... Ay....
Yaşı:
49
Konum:
Adana
Ofis Versiyonu:
Ofis 2003
Son Oturumu:
09/07/2020,16:17
Cevapla