- Katılım
- 23 Aralık 2017
- Mesajlar
- 48
- Excel Vers. ve Dili
- 2016
Aşağıdaki kodlara göre listbox'a verilerin gelmesi istenilen veriye tıklanınca texboxlara ve comboboxlara gelmesini güncellendikten sonrada tekrar kaydedilmesini istiyorum yardımcı olacaklara şimdiden çok teşekkür ederim.
Private Sub CommandButton1_Click()
If TextBox1.Text <> "" Then
Son_Dolu_Satir = Sheets("Sayfa1").Range("A65536").End(xlUp).Row
Bos_Satir = Son_Dolu_Satir + 1
Sheets("Sayfa1").Range("A" & Bos_Satir).Value = _
Application.WorksheetFunction.Max(Sheets("Sayfa1").Range("A:A")) + 1
Sheets("Sayfa1").Range("B" & Bos_Satir).Value = TextBox1.Text
Sheets("Sayfa1").Range("C" & Bos_Satir).Value = TextBox2.Text
Sheets("Sayfa1").Range("D" & Bos_Satir).Value = TextBox3.Text
Sheets("Sayfa1").Range("E" & Bos_Satir).Value = TextBox4.Text
Sheets("Sayfa1").Range("F" & Bos_Satir).Value = ComboBox1.Text
Sheets("Sayfa1").Range("G" & Bos_Satir).Value = TextBox5.Text
Sheets("Sayfa1").Range("H" & Bos_Satir).Value = ComboBox2.Text
Sheets("Sayfa1").Range("I" & Bos_Satir).Value = TextBox6.Text
Sheets("Sayfa1").Range("J" & Bos_Satir).Value = TextBox7.Text
Sheets("Sayfa1").Range("K" & Bos_Satir).Value = ComboBox3.Text
Sheets("Sayfa1").Range("L" & Bos_Satir).Value = TextBox8.Text
Sheets("Sayfa1").Range("O" & Bos_Satir).Value = ComboBox4.Text
Sheets("Sayfa1").Select
Else
MsgBox "İsim Girmeniz gerekiyor"
End If
MsgBox "Kayıt başarılı", vbApplicationModal, ""
Dim del As Control
For Each del In UserForm2.Controls
If TypeName(del) = "TextBox" Or TypeName(del) = "ComboBox" Then
del.Text = Empty
End If
Next del
End Sub
Private Sub CommandButton1_Click()
If TextBox1.Text <> "" Then
Son_Dolu_Satir = Sheets("Sayfa1").Range("A65536").End(xlUp).Row
Bos_Satir = Son_Dolu_Satir + 1
Sheets("Sayfa1").Range("A" & Bos_Satir).Value = _
Application.WorksheetFunction.Max(Sheets("Sayfa1").Range("A:A")) + 1
Sheets("Sayfa1").Range("B" & Bos_Satir).Value = TextBox1.Text
Sheets("Sayfa1").Range("C" & Bos_Satir).Value = TextBox2.Text
Sheets("Sayfa1").Range("D" & Bos_Satir).Value = TextBox3.Text
Sheets("Sayfa1").Range("E" & Bos_Satir).Value = TextBox4.Text
Sheets("Sayfa1").Range("F" & Bos_Satir).Value = ComboBox1.Text
Sheets("Sayfa1").Range("G" & Bos_Satir).Value = TextBox5.Text
Sheets("Sayfa1").Range("H" & Bos_Satir).Value = ComboBox2.Text
Sheets("Sayfa1").Range("I" & Bos_Satir).Value = TextBox6.Text
Sheets("Sayfa1").Range("J" & Bos_Satir).Value = TextBox7.Text
Sheets("Sayfa1").Range("K" & Bos_Satir).Value = ComboBox3.Text
Sheets("Sayfa1").Range("L" & Bos_Satir).Value = TextBox8.Text
Sheets("Sayfa1").Range("O" & Bos_Satir).Value = ComboBox4.Text
Sheets("Sayfa1").Select
Else
MsgBox "İsim Girmeniz gerekiyor"
End If
MsgBox "Kayıt başarılı", vbApplicationModal, ""
Dim del As Control
For Each del In UserForm2.Controls
If TypeName(del) = "TextBox" Or TypeName(del) = "ComboBox" Then
del.Text = Empty
End If
Next del
End Sub
