-
- Destek
-
Özel Arama
![]() |
Private Sub CommandButton1_Click()
If TextBox2.Text = Empty Then
MsgBox "Lütfen Alıcı Adı ve Soyadı Giriniz.", vbExclamation, "": Exit Sub
End If ' BOŞ BIRAKILMASINI İSTEMEDİĞİNİZ YERLER İÇİN...
If TextBox3.Text = Empty Then
MsgBox "Alıcı Adres Bilgilerini Kontrol ediniz!", vbExclamation, "": Exit Sub
End If ' BOŞ BIRAKILMASINI İSTEMEDİĞİNİZ YERLER İÇİN...
With Sheets("satış")
Satır = .Range("A65536").End(3).Row + 1 ' a sütunundaki son dolu satırı bulup bir sonraki satıra aşağıdaki işlemi yapar
.Cells(Satır, 2) = CDate(TextBox1.Text) 'birinci sütuna Textbox1 tarih formatında yazılır
.Cells(Satır, 3) = TextBox2 ' üçüncü sutuna ComboBox9 yazar
.Cells(Satır, 4) = TextBox3
.Cells(Satır, 5) = TextBox4
.Cells(Satır, 6) = TextBox5
.Cells(Satır, 7) = TextBox6
.Cells(Satır, 8) = TextBox7
.Cells(Satır, 13) = TextBox8
.Cells(Satır, 14) = ComboBox1
.Cells(Satır, 15) = ComboBox2
.Cells(Satır, 18) = TextBox9
.Cells(Satır, 19) = ComboBox3
.Cells(Satır, 20) = ComboBox4
.Cells(Satır, 21) = ComboBox5
.Cells(Satır, 22) = ComboBox6
.Cells(Satır, 24) = ComboBox7
.Cells(Satır, 31) = ComboBox8
.Cells(Satır, 32) = TextBox10
.Cells(Satır, 33) = TextBox11
.Cells(Satır, 34) = TextBox12
End With
For i = 2 To 10
Controls("Textbox" & i).Value = ""
Next
MsgBox "KAYIT İŞLEMİ TAMAMLANDI", , ""
End Sub
Private Sub UserForm_Initialize()
For x = 11 To Cells(65536, 1).End(xlUp).Row
If WorksheetFunction.CountIf(Range("A11:A" & x), Cells(x, 1)) = 1 Then
ComboBox1.AddItem Cells(x, 1).Value
End If
Next
End Sub
Private Sub Worksheet_Activate()
Combobox1.Clear
For x = 11 To Cells(65536, 1).End(xlUp).Row
If WorksheetFunction.CountIf(Range("A11:A" & x), Cells(x, 1)) = 1 Then
ComboBox1.AddItem Cells(x, 1).Value
End If
Next
End Sub
Bu forumu görüntüleyenler: Kayıtlı kullanıcı yok ve 2 misafir