netvolxxx
Altın Üye
- Katılım
- 29 Ağustos 2023
- Mesajlar
- 174
- Excel Vers. ve Dili
- 2013 Türkçe
- Altın Üyelik Bitiş Tarihi
- 07-03-2025
userform işleme göre eklenenleri tek butonla nasıl yapabilirim combobox1 den seçtiğim ürüne göre bi işlem d alanına kayıt yapıyor farklı bi işlem de c alanına kayıt
bu iki işlemi kodda tek butonla nasıl yapıcam yardımcı olursanız.....
kullandığım kodlar aşağıda
Private Sub CommandButton15_Click()
On Local Error Resume Next
Dim urunAdi As String
Dim urunSatir As Long
Sheets("Teklif").Range("f13") = TextBox13.Value
If ComboBox1.ListIndex = -1 Then
MsgBox "Lütfen bir ürün seçiniz.", vbExclamation
Exit Sub
End If
urunAdi = ComboBox1.Value
urunSatir = ComboBox1.List(ComboBox1.ListIndex, 1)
ThisWorkbook.Sheets("Teklif").Cells(urunSatir + 0, "D").Value = TextBox5.Value + 0
TextBox5 = ""
MsgBox "Kaydedildi.", vbInformation
end sub
Private Sub CommandButton16_Click()
On Local Error Resume Next
Dim urunAdi As String
Dim urunSatir As Long
If ComboBox1.ListIndex = -1 Then
MsgBox "Lütfen bir ürün seçiniz.", vbExclamation
Exit Sub
End If
urunAdi = ComboBox1.Value
urunSatir = ComboBox1.List(ComboBox1.ListIndex, 1)
ThisWorkbook.Sheets("Teklif").Cells(urunSatir + 3, "c").Value = ComboBox2.Value
MsgBox "Kaydedildi.", vbInformation
end sub
bu iki işlemi kodda tek butonla nasıl yapıcam yardımcı olursanız.....
kullandığım kodlar aşağıda
Private Sub CommandButton15_Click()
On Local Error Resume Next
Dim urunAdi As String
Dim urunSatir As Long
Sheets("Teklif").Range("f13") = TextBox13.Value
If ComboBox1.ListIndex = -1 Then
MsgBox "Lütfen bir ürün seçiniz.", vbExclamation
Exit Sub
End If
urunAdi = ComboBox1.Value
urunSatir = ComboBox1.List(ComboBox1.ListIndex, 1)
ThisWorkbook.Sheets("Teklif").Cells(urunSatir + 0, "D").Value = TextBox5.Value + 0
TextBox5 = ""
MsgBox "Kaydedildi.", vbInformation
end sub
Private Sub CommandButton16_Click()
On Local Error Resume Next
Dim urunAdi As String
Dim urunSatir As Long
If ComboBox1.ListIndex = -1 Then
MsgBox "Lütfen bir ürün seçiniz.", vbExclamation
Exit Sub
End If
urunAdi = ComboBox1.Value
urunSatir = ComboBox1.List(ComboBox1.ListIndex, 1)
ThisWorkbook.Sheets("Teklif").Cells(urunSatir + 3, "c").Value = ComboBox2.Value
MsgBox "Kaydedildi.", vbInformation
end sub