DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Private Sub cbsure_Change()
Dim t1 As Date, t2 As Date
txttarih2 = Empty
Txtsure = Empty
If txttarih1 = "" Then
MsgBox ("Tarih1 alanınına tarih girin.")
TextBox1.SetFocus
Exit Sub
End If
t1 = txttarih1
txttarih2 = Format(DateAdd("m", cbsure, t1), "dd.mm.yyyy")
t2 = txttarih2
txtkalan = t2 - t1
txtisim.SetFocus
End Sub
Private Sub CommandButton1_Click()
Dim bak As Range
Dim say As Integer
For Each bak In Range("A1:A" & WorksheetFunction.CountA(Range("A1:A65000")))
If bak.Value = cbad.Value Then
MsgBox "Bu Kayıt numarası bulundu."
Exit Sub
End If
Next bak
For Each bak In Range("B1:B" & WorksheetFunction.CountA(Range("B1:B65000")))
If StrConv(bak.Value, vbUpperCase) = StrConv(cbad.Value, vbUpperCase) Then
MsgBox "Bu isimde bir kaydınız bulundu"
Exit Sub
End If
Next bak
say = WorksheetFunction.CountA(Range("B1:B65000"))
txtsira.Value = say
Cells(say + 1, 1).Value = txtsira.Value
Cells(say + 1, 2).Value = cbad.Value
Cells(say + 1, 3).Value = txtisim.Value
Cells(say + 1, 4).Value = CDate(txttarih1.Value)
Cells(say + 1, 5).Value = cbsure.Value
Cells(say + 1, 6).Value = CDate(txttarih2.Value)
Cells(say + 1, 7).Value = txtkalan.Value
Workbooks("senet").Save
MsgBox "Verileriniz Kaydedildi", , "KAYIT"
txtsira.Value = WorksheetFunction.Count(Range("A1:A65000")) + 1
End Sub
Private Sub UserForm_Initialize()
Dim i As Integer, STR As Long, STR1 As Long
For i = 1 To 12
cbsure.AddItem i
Next i
STR1 = 0
ListBox1.ColumnCount = 7
For STR = 2 To Cells(Rows.Count, "A").End(xlUp).Row
If CDate(Cells(STR, "F")) <= CDate(Date) Then
ListBox1.AddItem
ListBox1.List(STR1, 0) = Cells(STR, "A")
ListBox1.List(STR1, 1) = Cells(STR, "B")
ListBox1.List(STR1, 2) = Cells(STR, "C")
ListBox1.List(STR1, 3) = Format(Cells(STR, "D"), "dd.mm.yyyy")
ListBox1.List(STR1, 4) = Cells(STR, "E")
ListBox1.List(STR1, 5) = Format(Cells(STR, "F"), "dd.mm.yyyy")
ListBox1.List(STR1, 6) = Cells(STR, "G")
STR1 = STR1 + 1
End If
Next
End Sub
Option Explicit
Private Sub UserForm_Initialize()
Dim STR As Long, STR1 As Long
STR1 = 0
ListBox1.ColumnWidths = "15;60;100;50;15;50;15"
ListBox1.ColumnCount = 7
For STR = 2 To Cells(Rows.Count, "A").End(xlUp).Row
If CDate(Cells(STR, "F")) <= CDate(Date) Then
ListBox1.AddItem
ListBox1.List(STR1, 0) = Cells(STR, "A")
ListBox1.List(STR1, 1) = Cells(STR, "B")
ListBox1.List(STR1, 2) = Cells(STR, "C")
ListBox1.List(STR1, 3) = Format(Cells(STR, "D"), "dd.mm.yyyy")
ListBox1.List(STR1, 4) = Cells(STR, "E")
ListBox1.List(STR1, 5) = Format(Cells(STR, "F"), "dd.mm.yyyy")
ListBox1.List(STR1, 6) = Cells(STR, "G")
STR1 = STR1 + 1
End If
Next
End Sub
Sayın asi_Kral, kodlarınızı deneyeceğim, eminim tam istediğim şekilde çalışacaktır. ellerinize sağlık. çok teşekkür ederim. çalışmalarınızda başarılar dilerim...