- Katılım
- 8 Haziran 2007
- Mesajlar
- 761
- Excel Vers. ve Dili
- excel- 2003 Türkçe
Private Sub CommandButton2_Click()
Sheets("Personel_Bilgi").Select
If TextBox1.Value = "" Then
MsgBox "Personel No'su Boş Olamaz..!", vbCritical
TextBox1.SetFocus
Exit Sub
End If
If MsgBox("DEĞİŞİKLİK YAPMAK İSTYORMUSUNUZ.?", vbQuestion) = vbNo Then
TextBox1.SetFocus
Exit Sub
End If
Set k = Range("B11:B65536").Find(TextBox1.Value, , xlValues, xlWhole)
If Not k Is Nothing Then
For i = 4 To 7
If Not IsNumeric(Controls("TextBox" & i)) Then Controls("TextBox" & i) = 0
Cells(k.Row, "D").Value = TextBox2.Value
Cells(k.Row, "E").Value = TextBox3.Value
Cells(k.Row, "BA").Value = ComboBox6.Value
MsgBox "Değişiklik Yapıldı"
For j = 1 To 32
Controls("TextBox" & j) = ""
Next
For l = 1 To 6
Controls("ComboBox" & l) = ""
Next
For Y = 40 To 51
Controls("textbox" & Y) = ""
Next
Exit Sub
Next i
Else
MsgBox "Değitirelecek Veri Bulunamadı.!"
End If
End Sub
Sorgu çağır ile Form üzerindeki TextBoxlara gelen verileri DELETE ile silip kaydet dediğimde hata veriyor. Sıfır da yazmak istemiyorum.
Sheets("Personel_Bilgi").Select
If TextBox1.Value = "" Then
MsgBox "Personel No'su Boş Olamaz..!", vbCritical
TextBox1.SetFocus
Exit Sub
End If
If MsgBox("DEĞİŞİKLİK YAPMAK İSTYORMUSUNUZ.?", vbQuestion) = vbNo Then
TextBox1.SetFocus
Exit Sub
End If
Set k = Range("B11:B65536").Find(TextBox1.Value, , xlValues, xlWhole)
If Not k Is Nothing Then
For i = 4 To 7
If Not IsNumeric(Controls("TextBox" & i)) Then Controls("TextBox" & i) = 0
Cells(k.Row, "D").Value = TextBox2.Value
Cells(k.Row, "E").Value = TextBox3.Value
Cells(k.Row, "BA").Value = ComboBox6.Value
MsgBox "Değişiklik Yapıldı"
For j = 1 To 32
Controls("TextBox" & j) = ""
Next
For l = 1 To 6
Controls("ComboBox" & l) = ""
Next
For Y = 40 To 51
Controls("textbox" & Y) = ""
Next
Exit Sub
Next i
Else
MsgBox "Değitirelecek Veri Bulunamadı.!"
End If
End Sub
Sorgu çağır ile Form üzerindeki TextBoxlara gelen verileri DELETE ile silip kaydet dediğimde hata veriyor. Sıfır da yazmak istemiyorum.