VURANOĞLU
Yeni Üye
- Katılım
- 5 Şub 2024
- Mesajlar
- 18
- En iyi yanıt
- 0
- Puanları
- 3
- Yaş
- 68
- Konum
- ESKİŞEHİR
- Ad Soyad
- MEHMET VURANOĞLU
- Office Vers.
- 2016
Merhaba
Evrak teslim butonu ile teslim işleminin bitimi tamamlanıyordu.
Ancak teslim edilmiş evrakın tekrar teslim işleminin olmaması için textbox 8-9-10-11
dolu olması halinde işlemin sonlandırılması gerekmektedir.
Kodlarda nasıl düzeltme yapmalıyım?
Private Sub CommandButton3_Click()
If EVRAKARAMA.ListIndex < 0 Then MsgBox "LİSTEDEN SEÇİM YAPINIZ ! ", vbCritical, "VURANOĞLU": Exit Sub
If CDbl(TextBox3.Value) > CDbl(Sheets("VERİ").Range("a65536").End(xlUp).Row) Then MsgBox "KAYIT BUTONUNU KULLANINIZ !"
If CDbl(TextBox3.Value) <> CDbl(EVRAKARAMA.Value) Then MsgBox "LÜTFEN LİSTEDEN SEÇİM YAPINIZ!", vbExclamation, " VURANOĞLU !: Exit Sub"
If TextBox8.Value = "" Then
MsgBox "LÜTFEN " & vbLf & " " & vbLf & "TARİHİ GİRİNİZ!." & vbLf & " ", vbExclamation, "VURANOĞLU!"
Exit Sub
End If
If TextBox9.Value = "" Then
MsgBox "SADECE HARF GİREBİLİRSİNİZ.", vbExclamation, " VURANOĞLU !"
MsgBox " " & vbNewLine & " " & vbNewLine & "ADI" & vbNewLine & " " & vbNewLine & "BOŞ GEÇEMEZSİNİZ", vbExclamation, "VURANOĞLU!"
Exit Sub
End If
If TextBox10.Value = "" Then
MsgBox " 'SOYADI' BOŞ GEÇEMEZSİNİZ!", vbExclamation, " VURANOĞLU"
Exit Sub
End If
If TextBox11.Value = "" Then
MsgBox " 'YAKINLIĞI ' BOŞ GEÇEMEZSİNİZ!", vbExclamation, " VURANOĞLU"
Exit Sub
End If
If sor = vbNo Then Exit Sub
Degistirilecek_Satir = EVRAKARAMA.ListIndex + 2
If IsNumeric(TextBox3) = True Then Sheets("VERİ").Range("A" & Degistirilecek_Satir).Value = CDbl(TextBox3)
sor = MsgBox(" " & vbNewLine & " EVRAK TESLİM EDİLECEK" & vbNewLine & " " & vbNewLine & " EMİN MİSİNİZ??", vbYesNo + vbQuestion, "VURANOĞLU !")
If sor = vbNo Then Exit Sub
Sheets("VERİ").Range("C" & Degistirilecek_Satir).Value = TextBox5.Text 'ADI
Sheets("VERİ").Range("D" & Degistirilecek_Satir).Value = TextBox6.Text 'SOYADI
Sheets("VERİ").Range("E" & Degistirilecek_Satir).Value = TextBox7.Text 'GELDİĞİ YER
Sheets("VERİ").Range("F" & Degistirilecek_Satir).Value = TextBox8.Text 'TARİH
Sheets("VERİ").Range("G" & Degistirilecek_Satir).Value = TextBox9.Text 'ADI
Sheets("VERİ").Range("H" & Degistirilecek_Satir).Value = TextBox10.Text 'SOYADI
Sheets("VERİ").Range("I" & Degistirilecek_Satir).Value = TextBox11.Text 'YAKINLIĞI
If IsNumeric(TextBox5) = True Then Sheets("VERİ").Range("C" & Degistirilecek_Satir).Value = CDbl(TextBox5)
If IsNumeric(TextBox6) = True Then Sheets("VERİ").Range("D" & Degistirilecek_Satir).Value = CDbl(TextBox6)
If IsNumeric(TextBox7) = True Then Sheets("VERİ").Range("E" & Degistirilecek_Satir).Value = CDbl(TextBox7)
If IsNumeric(TextBox9) = True Then Sheets("VERİ").Range("G" & Degistirilecek_Satir).Value = CDbl(TextBox9)
If IsNumeric(TextBox10) = True Then Sheets("VERİ").Range("H" & Degistirilecek_Satir).Value = CDbl(TextBox10)
If IsNumeric(TextBox11) = True Then Sheets("VERİ").Range("I" & Degistirilecek_Satir).Value = CDbl(TextBox11)
TextBox1.Value = Sheets("VERİ").Range("a65536").End(xlUp).Row
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
TextBox8.Text = ""
TextBox9.Text = ""
TextBox10.Text = ""
TextBox11.Text = ""
TextBox2.Text = ""
TextBox1.Text = ""
TextBox3.Text = ""
EVRAKARAMA_Initialize
s = 0
For a = 8 To 11
If Controls("Textbox" & a) = " " Then
s = s + 1
End If
Next
MsgBox "D İ K K A T ! " & vbLf & " " & vbLf & "EVRAK TESLİM EDİLMİŞ!." & " " & vbLf & " " & vbLf & " ÇIKILIYOR.." & vbLf & " ", vbExclamation, "VURANOĞLU!"
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
TextBox8.Text = ""
TextBox9.Text = ""
TextBox10.Text = ""
TextBox11.Text = ""
TextBox2.Text = ""
TextBox1.Text = ""
TextBox3.Text = ""
Exit Sub
End Sub
Evrak teslim butonu ile teslim işleminin bitimi tamamlanıyordu.
Ancak teslim edilmiş evrakın tekrar teslim işleminin olmaması için textbox 8-9-10-11
dolu olması halinde işlemin sonlandırılması gerekmektedir.
Kodlarda nasıl düzeltme yapmalıyım?
Private Sub CommandButton3_Click()
If EVRAKARAMA.ListIndex < 0 Then MsgBox "LİSTEDEN SEÇİM YAPINIZ ! ", vbCritical, "VURANOĞLU": Exit Sub
If CDbl(TextBox3.Value) > CDbl(Sheets("VERİ").Range("a65536").End(xlUp).Row) Then MsgBox "KAYIT BUTONUNU KULLANINIZ !"
If CDbl(TextBox3.Value) <> CDbl(EVRAKARAMA.Value) Then MsgBox "LÜTFEN LİSTEDEN SEÇİM YAPINIZ!", vbExclamation, " VURANOĞLU !: Exit Sub"
If TextBox8.Value = "" Then
MsgBox "LÜTFEN " & vbLf & " " & vbLf & "TARİHİ GİRİNİZ!." & vbLf & " ", vbExclamation, "VURANOĞLU!"
Exit Sub
End If
If TextBox9.Value = "" Then
MsgBox "SADECE HARF GİREBİLİRSİNİZ.", vbExclamation, " VURANOĞLU !"
MsgBox " " & vbNewLine & " " & vbNewLine & "ADI" & vbNewLine & " " & vbNewLine & "BOŞ GEÇEMEZSİNİZ", vbExclamation, "VURANOĞLU!"
Exit Sub
End If
If TextBox10.Value = "" Then
MsgBox " 'SOYADI' BOŞ GEÇEMEZSİNİZ!", vbExclamation, " VURANOĞLU"
Exit Sub
End If
If TextBox11.Value = "" Then
MsgBox " 'YAKINLIĞI ' BOŞ GEÇEMEZSİNİZ!", vbExclamation, " VURANOĞLU"
Exit Sub
End If
If sor = vbNo Then Exit Sub
Degistirilecek_Satir = EVRAKARAMA.ListIndex + 2
If IsNumeric(TextBox3) = True Then Sheets("VERİ").Range("A" & Degistirilecek_Satir).Value = CDbl(TextBox3)
sor = MsgBox(" " & vbNewLine & " EVRAK TESLİM EDİLECEK" & vbNewLine & " " & vbNewLine & " EMİN MİSİNİZ??", vbYesNo + vbQuestion, "VURANOĞLU !")
If sor = vbNo Then Exit Sub
Sheets("VERİ").Range("C" & Degistirilecek_Satir).Value = TextBox5.Text 'ADI
Sheets("VERİ").Range("D" & Degistirilecek_Satir).Value = TextBox6.Text 'SOYADI
Sheets("VERİ").Range("E" & Degistirilecek_Satir).Value = TextBox7.Text 'GELDİĞİ YER
Sheets("VERİ").Range("F" & Degistirilecek_Satir).Value = TextBox8.Text 'TARİH
Sheets("VERİ").Range("G" & Degistirilecek_Satir).Value = TextBox9.Text 'ADI
Sheets("VERİ").Range("H" & Degistirilecek_Satir).Value = TextBox10.Text 'SOYADI
Sheets("VERİ").Range("I" & Degistirilecek_Satir).Value = TextBox11.Text 'YAKINLIĞI
If IsNumeric(TextBox5) = True Then Sheets("VERİ").Range("C" & Degistirilecek_Satir).Value = CDbl(TextBox5)
If IsNumeric(TextBox6) = True Then Sheets("VERİ").Range("D" & Degistirilecek_Satir).Value = CDbl(TextBox6)
If IsNumeric(TextBox7) = True Then Sheets("VERİ").Range("E" & Degistirilecek_Satir).Value = CDbl(TextBox7)
If IsNumeric(TextBox9) = True Then Sheets("VERİ").Range("G" & Degistirilecek_Satir).Value = CDbl(TextBox9)
If IsNumeric(TextBox10) = True Then Sheets("VERİ").Range("H" & Degistirilecek_Satir).Value = CDbl(TextBox10)
If IsNumeric(TextBox11) = True Then Sheets("VERİ").Range("I" & Degistirilecek_Satir).Value = CDbl(TextBox11)
TextBox1.Value = Sheets("VERİ").Range("a65536").End(xlUp).Row
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
TextBox8.Text = ""
TextBox9.Text = ""
TextBox10.Text = ""
TextBox11.Text = ""
TextBox2.Text = ""
TextBox1.Text = ""
TextBox3.Text = ""
EVRAKARAMA_Initialize
s = 0
For a = 8 To 11
If Controls("Textbox" & a) = " " Then
s = s + 1
End If
Next
MsgBox "D İ K K A T ! " & vbLf & " " & vbLf & "EVRAK TESLİM EDİLMİŞ!." & " " & vbLf & " " & vbLf & " ÇIKILIYOR.." & vbLf & " ", vbExclamation, "VURANOĞLU!"
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
TextBox8.Text = ""
TextBox9.Text = ""
TextBox10.Text = ""
TextBox11.Text = ""
TextBox2.Text = ""
TextBox1.Text = ""
TextBox3.Text = ""
Exit Sub
End Sub