Kaydet Kodunda hata

Katılım
16 Kasım 2006
Mesajlar
157
Excel Vers. ve Dili
excell 2003
Altın Üyelik Bitiş Tarihi
28-12-2023
arkadaşlar aşağıdaki kaydet kodunda hata veriyor hatayı bulamadım yardımlarınızı bekliyorum. teşekkürler

Private Sub KAYDET_Click()
Set s1 = Sheets("persbilgi")
If TextBox1.Text = "" Then '1
MsgBox "Lütfen Sicil Alanını Boş Geçmeyiniz", vbInformation, "Uyarı"
TextBox1.SetFocus
Exit Sub
End If
If TextBox2.Text = "" Then '2
MsgBox " Lütfen Personel Adı Giriniz", vbInformation, "Uyarı"
TextBox2.SetFocus
Exit Sub
ElseIf TextBox3.Text = "" Then
MsgBox " Lütfen Personel Soyadı Giriniz", vbInformation, "Uyarı"
TextBox3.SetFocus
Exit Sub
ElseIf ComboBox1.Text = "" Then
MsgBox "Lütfen Personel Ünvanını Giriniz", vbInformation, "Uyarı"
ComboBox1.SetFocus
Exit Sub
ElseIf ComboBox2.Text = "" Then
MsgBox " Lütfen Personel Çalıştığı Birimini Giriniz", vbInformation, "UYARI"
ComboBox2.SetFocus
Exit Sub
If TextBox4.Text = "" Then
MsgBox "Lütfen T.C. Kimlik No Giriniz", vbInformation, "Uyarı"
TextBox4.SetFocus
Exit Sub
End If
If TextBox5.Text = "" Then
MsgBox " Lütfen Emekli Sicil No Giriniz", vbInformation, "Uyarı"
TextBox5.SetFocus
Exit Sub
ElseIf TextBox6.Text = "" Then
MsgBox " Lütfen Silah Seri No Giriniz", vbInformation, "Uyarı"
TextBox6.SetFocus
Exit Sub
ElseIf ComboBox9.Text = "" Then
MsgBox "Lütfen Silah Markasını Belirtiniz", vbInformation, "Uyarı"
ComboBox9.SetFocus
Exit Sub
ElseIf TextBox8.Text = "" Then
MsgBox " Lütfen Ev Tel No Giriniz", vbInformation, "Uyarı"
TextBox8.SetFocus
If TextBox9.Text = "" Then '2
MsgBox " Lütfen Cep Tel No Giriniz", vbInformation, "Uyarı"
TextBox9.SetFocus
Exit Sub
ElseIf TextBox10.Text = "" Then
MsgBox " Adres 1'i Boş Geçemezsin ", vbInformation, "Uyarı"
TextBox10.SetFocus
Exit Sub
ElseIf ComboBox3.Text = "" Then
MsgBox "Lütfen Personelin Derecesini Giriniz", vbInformation, "Uyarı"
ComboBox3.SetFocus
Exit Sub
ElseIf ComboBox4.Text = "" Then
MsgBox " Lütfen Personelin Kademesini Giriniz", vbInformation, "Uyarı"
ComboBox4.SetFocus
Exit Sub
If ComboBox5.Text = "" Then
MsgBox "Lütfen Personelin Tahsilini Belirtiniz", vbInformation, "Uyarı"
ComboBox5.SetFocus
Exit Sub
End If
If ComboBox6.Text = "" Then
MsgBox " Lütfen Personelin Medeni Halini Belirtiniz", vbInformation, "Uyarı"
ComboBox6.SetFocus
Exit Sub
ElseIf ComboBox7.Text = "" Then
MsgBox " Eş Durumu ??????", vbInformation, "Uyarı"
ComboBox7.SetFocus
Exit Sub
ElseIf ComboBox8.Text = "" Then
MsgBox "Lütfen Kan Grubunu Belirtiniz", vbInformation, "Uyarı"
ComboBox8.SetFocus
Exit Sub

End If
For bak = 2 To [b6536].End(xlUp).Row'mükerrer kayıt
If Range("b" & bak) Like TextBox1 Then
MsgBox "Bu isimde bir kaydınız mevcut.", vbInformation
Exit Sub
End If
e = s2.[e65536].End(3).Row
Cells(e + 1, "b") = TextBox1.Text
Cells(e + 1, "c") = TextBox2.Text
Cells(e + 1, "d") = TextBox3.Text
Cells(e + 1, "e") = ComboBox1.Text
Cells(e + 1, "f") = ComboBox2.Text
Cells(e + 1, "g") = ComboBox3.Text
Cells(e + 1, "h") = ComboBox4.Text
Cells(e + 1, "ı") = ComboBox5.Text
Cells(e + 1, "j") = ComboBox6.Text
Cells(e + 1, "k") = ComboBox7.Text
Cells(e + 1, "l") = TextBox5.Text
Cells(e + 1, "m") = TextBox4.Text
Cells(e + 1, "n") = ComboBox9.Text
Cells(e + 1, "o") = TextBox6.Text
Cells(e + 1, "p") = ComboBox8.Text
Cells(e + 1, "q") = TextBox8.Text
Cells(e + 1, "r") = TextBox9.Text
Cells(e + 1, "s") = TextBox10.Text
Cells(e + 1, "t") = TextBox11.Text

MsgBox TextBox1.Value & " Sicilli Personelin kaydı Yapılmıştır", vbInformation, "Bilgi"
TextBox1.Text=""
TextBox2.Text=""
TextBox3.Text=""
ComboBox1.Text=""
ComboBox2.Text=""
ComboBox3.Text=""
ComboBox4.Text=""
ComboBox5.Text=""
ComboBox6.Text=""
ComboBox7.Text=""
TextBox5.Text=""
TextBox4.Text=""
ComboBox9.Text=""
TextBox6.Text=""
ComboBox8.Text=""
TextBox8.Text=""
TextBox9.Text=""
TextBox10.Text=""
TextBox11.Text=""



End Sub
 

Korhan Ayhan

Administrator
Yönetici
Admin
Katılım
15 Mart 2005
Mesajlar
42,666
Excel Vers. ve Dili
Microsoft 365 Tr-En 64 Bit
Selamlar,

Sakın üzerinize alınmayın ama son günlerde bulmaca gibi soru soruluyor. Ve bir müddet cevap gelmeyincede serzenişte bulunuluyor. Şimdi bu soruyu sizin yerinize bir başkası sorsaydı ve siz bu soruyu çözmek için bu başlığa tıklasaydınız bu kadar kodun içinde HATA veren kısmı nasıl bulurdunuz?

Lütfen sorularınızı açık bir dille ifade ediniz. Bu şekilde sormaya devam ettiğiniz sürece cevap almanız zorlaşacaktır.
 
Katılım
16 Kasım 2006
Mesajlar
157
Excel Vers. ve Dili
excell 2003
Altın Üyelik Bitiş Tarihi
28-12-2023
uyarınız için teşekkür ederim

Selamlar,

Sakın üzerinize alınmayın ama son günlerde bulmaca gibi soru soruluyor. Ve bir müddet cevap gelmeyincede serzenişte bulunuluyor. Şimdi bu soruyu sizin yerinize bir başkası sorsaydı ve siz bu soruyu çözmek için bu başlığa tıklasaydınız bu kadar kodun içinde HATA veren kısmı nasıl bulurdunuz?

Lütfen sorularınızı açık bir dille ifade ediniz. Bu şekilde sormaya devam ettiğiniz sürece cevap almanız zorlaşacaktır.
sayın korhan ayhan bey uyarınız için teşekkür ederim
sorun ile ilgili olarak örnek bir çalışma gönderiyorum
gerekli açıklamalar örnekte belirtilmiştir
teşekkürler
 

Orion1

Uzman
Uzman
Katılım
1 Mart 2005
Mesajlar
22,254
Excel Vers. ve Dili
Win7 Home Basic TR 64 Bit

Ofis-2010-TR 32 Bit
Dosyayı inceleyiniz.:cool:
 
Katılım
16 Kasım 2006
Mesajlar
157
Excel Vers. ve Dili
excell 2003
Altın Üyelik Bitiş Tarihi
28-12-2023
3 LÜ Kayit Yapiyor

Dosyayı inceleyiniz.:cool:
Sayın: Evren GİZLEN yardımlarınızdan dolayı teşekkür ederim
kaydet butonuna bastığımda 1 kez kayıt yapması gerekirken
3 kayıt yapıyor.
 
Üst