Merhabalar aşağıdaki kaydet olayının "cekler" isimli sayfaya yapılmasını istiyorum.Nasıl bir ekleme yapmak gerekir acaba.
Private Sub kaydet_Click()
Dim bak As Range
Dim say As Integer
For Each bak In Range("A1:A" & WorksheetFunction.CountA(Range("A1:A65000")))
If bak.Value = cbad.Value Then
MsgBox "Bu Kayıt numarası bulundu."
Exit Sub
End If
If cbad.Value = "" Then
MsgBox "Bir isim girmelisiniz."
Exit Sub
End If
Next bak
say = WorksheetFunction.CountA(Range("B1:B65000"))
txtsira.Value = say
Cells(say + 1, 1).Value = txtsira.Value
Cells(say + 1, 2).Value = cbad.Value
Cells(say + 1, 3).Value = txtsoyad.Value
Cells(say + 1, 4).Value = txtadres.Value
Cells(say + 1, 5).Value = txtcep.Value
Cells(say + 1, 6).Value = txtev.Value
Cells(say + 1, 7).Value = cbmal.Value
Cells(say + 1, 8).Value = txttutar.Value
Cells(say + 1, 9).Value = txtmaltarihi.Value
Cells(say + 1, 10).Value = txtfisno.Value
Cells(say + 1, 11).Value = txtodeme1.Value
Cells(say + 1, 12).Value = txttarih1.Value
Cells(say + 1, 13).Value = txtodeme2.Value
Cells(say + 1, 14).Value = txttarih2.Value
Cells(say + 1, 15).Value = txtodeme3.Value
Cells(say + 1, 16).Value = txttarih3.Value
Cells(say + 1, 17).Value = txtodeme4.Value
Cells(say + 1, 18).Value = txttarih4.Value
Workbooks("MTP14.XLS").Save
MsgBox "Verileriniz Kaydedildi", , "KAYIT"
cmdtemizle_Click
cbad.RowSource = "Veri!B2:B" & say + 1
txtsira.Value = WorksheetFunction.Count(Range("A1:A65000")) + 1
End Sub
Private Sub kaydet_Click()
Dim bak As Range
Dim say As Integer
For Each bak In Range("A1:A" & WorksheetFunction.CountA(Range("A1:A65000")))
If bak.Value = cbad.Value Then
MsgBox "Bu Kayıt numarası bulundu."
Exit Sub
End If
If cbad.Value = "" Then
MsgBox "Bir isim girmelisiniz."
Exit Sub
End If
Next bak
say = WorksheetFunction.CountA(Range("B1:B65000"))
txtsira.Value = say
Cells(say + 1, 1).Value = txtsira.Value
Cells(say + 1, 2).Value = cbad.Value
Cells(say + 1, 3).Value = txtsoyad.Value
Cells(say + 1, 4).Value = txtadres.Value
Cells(say + 1, 5).Value = txtcep.Value
Cells(say + 1, 6).Value = txtev.Value
Cells(say + 1, 7).Value = cbmal.Value
Cells(say + 1, 8).Value = txttutar.Value
Cells(say + 1, 9).Value = txtmaltarihi.Value
Cells(say + 1, 10).Value = txtfisno.Value
Cells(say + 1, 11).Value = txtodeme1.Value
Cells(say + 1, 12).Value = txttarih1.Value
Cells(say + 1, 13).Value = txtodeme2.Value
Cells(say + 1, 14).Value = txttarih2.Value
Cells(say + 1, 15).Value = txtodeme3.Value
Cells(say + 1, 16).Value = txttarih3.Value
Cells(say + 1, 17).Value = txtodeme4.Value
Cells(say + 1, 18).Value = txttarih4.Value
Workbooks("MTP14.XLS").Save
MsgBox "Verileriniz Kaydedildi", , "KAYIT"
cmdtemizle_Click
cbad.RowSource = "Veri!B2:B" & say + 1
txtsira.Value = WorksheetFunction.Count(Range("A1:A65000")) + 1
End Sub