- Katılım
- 30 Kasım 2006
- Mesajlar
- 411
- Excel Vers. ve Dili
- Excel 2007 - Türkçe
- Altın Üyelik Bitiş Tarihi
- 05.07.2020
Arkadaşlar Aşağıdaki Kodların daha hızlı çalışabilmesi için nasıl bir düzenleme yapılabilir. Şimdiden emeğiniz için teşekkür ederim...
Private Sub kayit_Click()
On Error Resume Next
Dim aa, i, s, sira, sat
Dim x As Boolean
x = False
For i = 1 To Sheets("sayfa1").Cells(65000, 3).End(xlUp).Row
If ComboBox2.Text = Sheets("sayfa1").Cells(i, 3) And ComboBox3.Text = Sheets("sayfa1").Cells(i, 4) Then
x = True
MsgBox ("Mükerrer kayıt"), , "Bu kayıt daha önce girilmiş."
Exit For
End If
Next i
If x = False Then
aa = WorksheetFunction.CountA(Columns("A"))
If ComboBox1.Value = "" Then
MsgBox ("Desimal Noyu Giriniz.")
Exit Sub
End If
If ComboBox2.Value = "" Then
MsgBox ("Sayısını Giriniz.")
Exit Sub
Else
End If
For s = 1 To 17
Cells(aa + 1, s + 1) = Controls("ComboBox" & s)
Next s
For sira = 1 To aa
Cells(sira + 1, 1) = sira
Next sira
Dim sonsat
sonsat = [A65536].End(3).Row
Cells(sonsat, 17) = CDate(ComboBox16)
ListBox1.Clear
ActiveWorkbook.Save
MsgBox ComboBox2.Text & " numaralı evrak " & ComboBox1.Text & " klasörüne kaydedilmiştir."
ComboBox16 = Format(Date, "dd.mm.yyyy")
End If
End Sub
Private Sub kayit_Click()
On Error Resume Next
Dim aa, i, s, sira, sat
Dim x As Boolean
x = False
For i = 1 To Sheets("sayfa1").Cells(65000, 3).End(xlUp).Row
If ComboBox2.Text = Sheets("sayfa1").Cells(i, 3) And ComboBox3.Text = Sheets("sayfa1").Cells(i, 4) Then
x = True
MsgBox ("Mükerrer kayıt"), , "Bu kayıt daha önce girilmiş."
Exit For
End If
Next i
If x = False Then
aa = WorksheetFunction.CountA(Columns("A"))
If ComboBox1.Value = "" Then
MsgBox ("Desimal Noyu Giriniz.")
Exit Sub
End If
If ComboBox2.Value = "" Then
MsgBox ("Sayısını Giriniz.")
Exit Sub
Else
End If
For s = 1 To 17
Cells(aa + 1, s + 1) = Controls("ComboBox" & s)
Next s
For sira = 1 To aa
Cells(sira + 1, 1) = sira
Next sira
Dim sonsat
sonsat = [A65536].End(3).Row
Cells(sonsat, 17) = CDate(ComboBox16)
ListBox1.Clear
ActiveWorkbook.Save
MsgBox ComboBox2.Text & " numaralı evrak " & ComboBox1.Text & " klasörüne kaydedilmiştir."
ComboBox16 = Format(Date, "dd.mm.yyyy")
End If
End Sub