DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Private Sub CommandButton1_Click()
Dim sh As Worksheet, sat As Long, k As Range
If ComboBox2.ListCount > 0 Then
Set sh = Sheets(CStr(ComboBox2.Text))
Else
MsgBox "Sene comboboxı boş kayıt yapılmadı.", vbCritical, "UYARI"
Exit Sub
End If
If ComboBox5.ListCount < 1 Then
MsgBox "Daire dükkan comboboxı boş.Kayıt yapılmadı.", vbCritical, "UYARI"
Exit Sub
End If
If ComboBox1.ListCount < 1 Then
MsgBox "Ay comboboxı boş.Kayıt yapılmadı.", vbCritical, "UYARI"
Exit Sub
End If
If Not IsNumeric(TextBox1.Text) Then
MsgBox "Ödeme sayısal bir değer olmalıdır.İşlem iptal edildi.", vbCritical, "UYARI"
TextBox1.SetFocus
Exit Sub
End If
sh.Select
sat = Cells(65536, "A").End(xlUp).Row
Set k = Range("A4:A" & sat).Find(ComboBox5.Value, , xlValues, xlWhole)
If Not k Is Nothing Then
Cells(k.Row, ComboBox1.ListIndex + 3).Value = CDbl(TextBox1.Text)
Cells(k.Row, ComboBox1.ListIndex + 3).NumberFormat = "#,##0.00 TL"
End If
End Sub
Private Sub UserForm_Initialize()
Dim sh As Worksheet
For Each sh In Worksheets
If IsNumeric(sh.Name) Then
If Len(sh.Name) = 4 Then
ComboBox2.AddItem sh.Name
ComboBox5.Clear
ComboBox5.List = sh.Range("A4:A15").Value
ComboBox1.Clear
ComboBox1.Column = sh.Range("C3:N3").Value
End If
End If
Next
On Error Resume Next
ComboBox2.ListIndex = 0
ComboBox5.ListIndex = 0
ComboBox1.ListIndex = 0
End Sub
Rica ederim.Sayın Evren Gizlen ilginize çok teşekkür ederim
Dosyanız hazır.
Gider kısmını bıraktım.Onu başka arkadaşlara yaprın.
Dosyanız ektedir.
Kod:Private Sub CommandButton1_Click() Dim sh As Worksheet, sat As Long, k As Range If ComboBox2.ListCount > 0 Then Set sh = Sheets(CStr(ComboBox2.Text)) Else MsgBox "Sene comboboxı boş kayıt yapılmadı.", vbCritical, "UYARI" Exit Sub End If If ComboBox5.ListCount < 1 Then MsgBox "Daire dükkan comboboxı boş.Kayıt yapılmadı.", vbCritical, "UYARI" Exit Sub End If If ComboBox1.ListCount < 1 Then MsgBox "Ay comboboxı boş.Kayıt yapılmadı.", vbCritical, "UYARI" Exit Sub End If If Not IsNumeric(TextBox1.Text) Then MsgBox "Ödeme sayısal bir değer olmalıdır.İşlem iptal edildi.", vbCritical, "UYARI" TextBox1.SetFocus Exit Sub End If sh.Select sat = Cells(65536, "A").End(xlUp).Row Set k = Range("A4:A" & sat).Find(ComboBox5.Value, , xlValues, xlWhole) If Not k Is Nothing Then Cells(k.Row, ComboBox1.ListIndex + 3).Value = CDbl(TextBox1.Text) Cells(k.Row, ComboBox1.ListIndex + 3).NumberFormat = "#,##0.00 TL" End If End Sub Private Sub UserForm_Initialize() Dim sh As Worksheet For Each sh In Worksheets If IsNumeric(sh.Name) Then If Len(sh.Name) = 4 Then ComboBox2.AddItem sh.Name ComboBox5.Clear ComboBox5.List = sh.Range("A4:A15").Value ComboBox1.Clear ComboBox1.Column = sh.Range("C3:N3").Value End If End If Next On Error Resume Next ComboBox2.ListIndex = 0 ComboBox5.ListIndex = 0 ComboBox1.ListIndex = 0 End Sub