'Sil
Private Sub Label37_Click()
If TextBox2 = "" Then
MsgBox "Önce silinecek verileri seçin!!!", vbExclamation
Exit Sub
End If
i = TextBox1.Text
s = MsgBox(i & " Sıra No'lu kaydı silmek istiyor musunuz?", vbInformation + vbYesNo)
'if textbox1.Text = 1 then
Application.ScreenUpdating = False
If s = vbYes Then
sayfa1.Range("A" & i + 1 & ":" & "DA" & i + 1).Delete
p = WorksheetFunction.CountA(sayfa1.Range("A:A"))
For k = 2 To p
sayfa1.Range("A" & k).Value = k - 1
Next k
If sayfa1.Range("A2").Value <> "" Then
ListBox1.RowSource = "sayfa1!a2:e" & p
ListBox1.ColumnCount = 4
ListBox1.ColumnWidths = "30;45;60;45"
End If
sayfa1.Range("a1").Select
TextBox1.Text = p
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
TextBox8.Text = ""
TextBox9.Text = ""
TextBox10.Text = ""
TextBox11.Text = ""
TextBox12.Text = ""
TextBox13.Text = ""
TextBox14.Text = ""
TextBox15.Text = ""
TextBox16.Text = ""
TextBox17.Text = ""
TextBox18.Text = ""
TextBox19.Text = ""
TextBox20.Text = ""
TextBox21.Text = ""
TextBox22.Text = ""
TextBox23.Text = ""
TextBox24.Text = ""
TextBox25.Text = ""
TextBox26.Text = ""
TextBox27.Text = ""
TextBox31.Text = ""
TextBox32.Text = ""
TextBox33.Text = ""
TextBox34.Text = ""
TextBox35.Text = ""
TextBox36.Text = ""
TextBox37.Text = ""
TextBox38.Text = ""
TextBox40.Text = ""
TextBox41.Text = ""
TextBox42.Text = ""
TextBox43.Text = ""
TextBox44.Text = ""
TextBox45.Text = ""
TextBox46.Text = ""
TextBox47.Text = ""
TextBox48.Text = ""
TextBox49.Text = ""
TextBox50.Text = ""
TextBox51.Text = ""
TextBox52.Text = ""
TextBox53.Text = ""
ElseIf s = vbNo Then
p = WorksheetFunction.CountA(sayfa1.Range("A:A"))
TextBox1.Text = p
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
TextBox8.Text = ""
TextBox9.Text = ""
TextBox10.Text = ""
TextBox11.Text = ""
TextBox12.Text = ""
TextBox13.Text = ""
TextBox14.Text = ""
TextBox15.Text = ""
TextBox16.Text = ""
TextBox17.Text = ""
TextBox18.Text = ""
TextBox19.Text = ""
TextBox20.Text = ""
TextBox21.Text = ""
TextBox22.Text = ""
TextBox23.Text = ""
TextBox24.Text = ""
TextBox25.Text = ""
TextBox26.Text = ""
TextBox27.Text = ""
TextBox31.Text = ""
TextBox32.Text = ""
TextBox33.Text = ""
TextBox34.Text = ""
TextBox35.Text = ""
TextBox36.Text = ""
TextBox37.Text = ""
TextBox38.Text = ""
TextBox40.Text = ""
TextBox41.Text = ""
TextBox42.Text = ""
TextBox43.Text = ""
TextBox44.Text = ""
TextBox45.Text = ""
TextBox46.Text = ""
TextBox47.Text = ""
TextBox48.Text = ""
TextBox49.Text = ""
TextBox50.Text = ""
TextBox51.Text = ""
TextBox52.Text = ""
TextBox53.Text = ""
Exit Sub
End If
Application.ScreenUpdating = True
End Sub
naıl başka sayfaya aktarıırm listboxtan seçiyorum sil diyorum silerken başka sayfaya bütün textboxdaki bilgileri aktarmak istiyorum teşekkürler
Private Sub Label37_Click()
If TextBox2 = "" Then
MsgBox "Önce silinecek verileri seçin!!!", vbExclamation
Exit Sub
End If
i = TextBox1.Text
s = MsgBox(i & " Sıra No'lu kaydı silmek istiyor musunuz?", vbInformation + vbYesNo)
'if textbox1.Text = 1 then
Application.ScreenUpdating = False
If s = vbYes Then
sayfa1.Range("A" & i + 1 & ":" & "DA" & i + 1).Delete
p = WorksheetFunction.CountA(sayfa1.Range("A:A"))
For k = 2 To p
sayfa1.Range("A" & k).Value = k - 1
Next k
If sayfa1.Range("A2").Value <> "" Then
ListBox1.RowSource = "sayfa1!a2:e" & p
ListBox1.ColumnCount = 4
ListBox1.ColumnWidths = "30;45;60;45"
End If
sayfa1.Range("a1").Select
TextBox1.Text = p
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
TextBox8.Text = ""
TextBox9.Text = ""
TextBox10.Text = ""
TextBox11.Text = ""
TextBox12.Text = ""
TextBox13.Text = ""
TextBox14.Text = ""
TextBox15.Text = ""
TextBox16.Text = ""
TextBox17.Text = ""
TextBox18.Text = ""
TextBox19.Text = ""
TextBox20.Text = ""
TextBox21.Text = ""
TextBox22.Text = ""
TextBox23.Text = ""
TextBox24.Text = ""
TextBox25.Text = ""
TextBox26.Text = ""
TextBox27.Text = ""
TextBox31.Text = ""
TextBox32.Text = ""
TextBox33.Text = ""
TextBox34.Text = ""
TextBox35.Text = ""
TextBox36.Text = ""
TextBox37.Text = ""
TextBox38.Text = ""
TextBox40.Text = ""
TextBox41.Text = ""
TextBox42.Text = ""
TextBox43.Text = ""
TextBox44.Text = ""
TextBox45.Text = ""
TextBox46.Text = ""
TextBox47.Text = ""
TextBox48.Text = ""
TextBox49.Text = ""
TextBox50.Text = ""
TextBox51.Text = ""
TextBox52.Text = ""
TextBox53.Text = ""
ElseIf s = vbNo Then
p = WorksheetFunction.CountA(sayfa1.Range("A:A"))
TextBox1.Text = p
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
TextBox8.Text = ""
TextBox9.Text = ""
TextBox10.Text = ""
TextBox11.Text = ""
TextBox12.Text = ""
TextBox13.Text = ""
TextBox14.Text = ""
TextBox15.Text = ""
TextBox16.Text = ""
TextBox17.Text = ""
TextBox18.Text = ""
TextBox19.Text = ""
TextBox20.Text = ""
TextBox21.Text = ""
TextBox22.Text = ""
TextBox23.Text = ""
TextBox24.Text = ""
TextBox25.Text = ""
TextBox26.Text = ""
TextBox27.Text = ""
TextBox31.Text = ""
TextBox32.Text = ""
TextBox33.Text = ""
TextBox34.Text = ""
TextBox35.Text = ""
TextBox36.Text = ""
TextBox37.Text = ""
TextBox38.Text = ""
TextBox40.Text = ""
TextBox41.Text = ""
TextBox42.Text = ""
TextBox43.Text = ""
TextBox44.Text = ""
TextBox45.Text = ""
TextBox46.Text = ""
TextBox47.Text = ""
TextBox48.Text = ""
TextBox49.Text = ""
TextBox50.Text = ""
TextBox51.Text = ""
TextBox52.Text = ""
TextBox53.Text = ""
Exit Sub
End If
Application.ScreenUpdating = True
End Sub
naıl başka sayfaya aktarıırm listboxtan seçiyorum sil diyorum silerken başka sayfaya bütün textboxdaki bilgileri aktarmak istiyorum teşekkürler
