- Katılım
- 3 Nisan 2008
- Mesajlar
- 777
- Excel Vers. ve Dili
- Office 2007 Türkçe
- Altın Üyelik Bitiş Tarihi
- 04-11-2020
Private Sub KAYDET_Click()
If ComboBox2.Value = "" Or ComboBox4.Value = "" Or ComboBox6.Value = "" Or TextBox4.Value = "" Then
MsgBox "EKSİK BİLGİ GİRİŞİ YAPTINIZ LÜTFEN KONTROL EDİN", vbInformation
Exit Sub
End If
With Sheets("GIRIS")
Satır = .Range("A65536").End(3).Row + 1
Set Bul = .Rows("1:1").Find(ComboBox6)
Sütun = Bul.Column
.Cells(Satır, 1) = Format(TextBox1, "dd.mm.yyyy")
.Cells(Satır, 2) = ComboBox2
.Cells(Satır, 3) = ComboBox3
.Cells(Satır, 4) = ComboBox4
.Cells(Satır, 6) = CDbl(TextBox2.Value)
.Cells(Satır, 5) = ComboBox5
.Cells(Satır, Sütun) = CDbl(TextBox4.Value)
.Cells(Satır, 27) = ComboBox7
.Cells(Satır, 28) = Format(TextBox8, "dd.mm.yyyy")
.Cells(Satır, 31) = TextBox9
.Cells(Satır, 29) = TextBox13
.Cells(Satır, 30) = TextBox14
.Cells.EntireColumn.AutoFit
Set Bul = .Rows("1:1").Find(ComboBox8)
Sütun = Bul.Column
.Cells(Satır, Sütun) = CDbl(TextBox15.Value)
Set Bul = Nothing
End With
End Sub
Yukarıdaki Makroya TextBox4 ve TextBox15 - (eksi) rakam girildiğinde ComboBox7 nin boş olmasının sağlanması veya boşaltılması için uyarı mesajı verilmesini ekleyebilirmiyiz.
Birde TextBox15 boş olursa Runtime error '13' Type mismatch hatası veriyor.
If ComboBox2.Value = "" Or ComboBox4.Value = "" Or ComboBox6.Value = "" Or TextBox4.Value = "" Then
MsgBox "EKSİK BİLGİ GİRİŞİ YAPTINIZ LÜTFEN KONTROL EDİN", vbInformation
Exit Sub
End If
With Sheets("GIRIS")
Satır = .Range("A65536").End(3).Row + 1
Set Bul = .Rows("1:1").Find(ComboBox6)
Sütun = Bul.Column
.Cells(Satır, 1) = Format(TextBox1, "dd.mm.yyyy")
.Cells(Satır, 2) = ComboBox2
.Cells(Satır, 3) = ComboBox3
.Cells(Satır, 4) = ComboBox4
.Cells(Satır, 6) = CDbl(TextBox2.Value)
.Cells(Satır, 5) = ComboBox5
.Cells(Satır, Sütun) = CDbl(TextBox4.Value)
.Cells(Satır, 27) = ComboBox7
.Cells(Satır, 28) = Format(TextBox8, "dd.mm.yyyy")
.Cells(Satır, 31) = TextBox9
.Cells(Satır, 29) = TextBox13
.Cells(Satır, 30) = TextBox14
.Cells.EntireColumn.AutoFit
Set Bul = .Rows("1:1").Find(ComboBox8)
Sütun = Bul.Column
.Cells(Satır, Sütun) = CDbl(TextBox15.Value)
Set Bul = Nothing
End With
End Sub
Yukarıdaki Makroya TextBox4 ve TextBox15 - (eksi) rakam girildiğinde ComboBox7 nin boş olmasının sağlanması veya boşaltılması için uyarı mesajı verilmesini ekleyebilirmiyiz.
Birde TextBox15 boş olursa Runtime error '13' Type mismatch hatası veriyor.
