Private Sub Kaydet_Click()
If TextBox3.Value = "" Then
MsgBox "Lütfen MÜŞTERİ İSMİNİ Giriniz...", vbExclamation, ""
Exit Sub
End If
If TextBox4.Value = "" Then
MsgBox "Lütfen ARAÇ İSMİNİ Giriniz...", vbExclamation, ""
Exit Sub
End If
If TextBox5.Value = "" Then
MsgBox "Lütfen ORTA KUMAŞ BİLGİSİNİ Giriniz...", vbExclamation, ""
Exit Sub
End If
If TextBox6.Value = "" Then
MsgBox "Lütfen KENAR KUMAŞ BİLGİSİNİ Giriniz...", vbExclamation, ""
Exit Sub
End If
If TextBox7.Value = "" Then
MsgBox "AÇIKLAMA BİLGİSİNİ Giriniz...", vbExclamation, ""
Exit Sub
End If
If TextBox9.Value = "" Then
MsgBox "Lütfen TESLİM TARİHİNİ Giriniz...", vbExclamation, ""
Exit Sub
End If
If TextBox11.Value = "" Then
MsgBox "Lütfen KARGO BİLGİSİNİ Giriniz...", vbExclamation, ""
Exit Sub
End If
If TextBox17.Value = "" Then
MsgBox "Lütfen ÖDEME ŞEKLİNİ Giriniz...", vbExclamation, ""
Exit Sub
If TextBox18.Value = "" Then
MsgBox "Lütfen PAZARLAMCI ADINI Giriniz...", vbExclamation, ""
Exit Sub
End If
End If
Ekli dosyayı görüntüle 21582
HTML:
On Error Resume Next
sor = MsgBox("Kaydedilsin mi?", vbYesNo + vbDefaultButton1 + vbQuestion, "KAYDET")
If sor = vbNo Then Exit Sub
Set syf = Sheets("Sipariş Listesi")
For I = 1 To SiparisGirisi.ListView1.ListItems.Count
If SiparisGirisi.ListView1.ListItems(I).Checked Then sat = I + 1: Exit For
Next I
If sat = Empty Then MsgBox "Lütfen kayıt yapmak istediğiniz satırı seçiniz...", vbExclamation, "ExcelCozum.com": Exit Sub
TextBox1 = sat - 2
If SiparisGirisi.ListView1.ListItems(I) <> Empty Then
sor = MsgBox("Listede seçili olan " & sat - 1 & ". satırın sonrasına eklensinsin mi?", vbYesNo + vbDefaultButton1 + vbQuestion, "KAYDET")
If sor = vbNo Then Exit Sub
sat = sat
syf.Rows(sat).Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
End If
'syf.Cells(sat, 1).Formula = "=IF(B" & sat & "="""","""",row()-2)"
syf.Cells(sat, 1).Formula = "=Row()-1"
For m = 2 To 18
syf.Cells(sat, m) = Controls("TextBox" & m)
Next m
SiparisGirisi.SipListele
ThisWorkbook.Save
MsgBox "Kayıt yapıldı", vbInformation, "ExcelCozum.com"
Unload Me
End Sub