- Katılım
- 19 Ağustos 2006
- Mesajlar
- 644
- Excel Vers. ve Dili
- Microsoft® Excel® Microsoft 365 için MSO /64 bit /Türkçe
Merhabalar,
aşağıdaki kod bloğun da hata alıyorum ve bir türlü çözemedim yardımcı olabilirmsiniz neyi alıyorum acaba."hata aldığım satırı kırmızı ile işaretledim"
Private Sub CommandButton1_Click()
Dim d1 As Date, d3 As Date
Dim a2 As Double
Dim son, s, temizle, sira As Long
Dim dDate As Date
Dim LValue As Boolean
TextBox6 = Format(Format(TextBox4.Value, "00000") + TextBox5.Value * 1, "dd.mm.yyyy")
TextBox4.Value = Format(TextBox4.Value, "dd.mm.yyyy")
LValue = IsDate(TextBox4)
If LValue = False Then
dDate = DateSerial(Year(Date), Month(Date), Day(Date))
TextBox4.Value = dDate
End If
d1 = TextBox4.Value
a2 = TextBox5.Value
If Len(a2) = 0 Then a2 = 0
d3 = DateAdd("d", a2, d1)
TextBox6 = d3
If TextBox1 = "" Then
MsgBox "Önce isim soyisim yazmalısınız", vbInformation
Exit Sub: End If
son = Cells(65536, "a").End(xlUp).Row + 1
s = 2
For tex = 1 To 17
Cells(son, s) = Controls("TextBox" & tex)
s = s + 1
Next
For sira = 2 To Cells(65536, "b").End(xlUp).Row
Cells(sira, "a") = sira - 1
Next
For temizle = 1 To 17
Controls("TextBox" & temizle) = Empty
Next
SIRALA = Cells(65536, "A").End(xlUp).Row
Sheets("veri").Range("A2:R" & SIRALA).Sort KEY1:=[B2], ORDER1:=xlAscending
TextBox8 = ".": TextBox8 = ""
ActiveWorkbook.Save
End Sub
aşağıdaki kod bloğun da hata alıyorum ve bir türlü çözemedim yardımcı olabilirmsiniz neyi alıyorum acaba."hata aldığım satırı kırmızı ile işaretledim"
Private Sub CommandButton1_Click()
Dim d1 As Date, d3 As Date
Dim a2 As Double
Dim son, s, temizle, sira As Long
Dim dDate As Date
Dim LValue As Boolean
TextBox6 = Format(Format(TextBox4.Value, "00000") + TextBox5.Value * 1, "dd.mm.yyyy")
TextBox4.Value = Format(TextBox4.Value, "dd.mm.yyyy")
LValue = IsDate(TextBox4)
If LValue = False Then
dDate = DateSerial(Year(Date), Month(Date), Day(Date))
TextBox4.Value = dDate
End If
d1 = TextBox4.Value
a2 = TextBox5.Value
If Len(a2) = 0 Then a2 = 0
d3 = DateAdd("d", a2, d1)
TextBox6 = d3
If TextBox1 = "" Then
MsgBox "Önce isim soyisim yazmalısınız", vbInformation
Exit Sub: End If
son = Cells(65536, "a").End(xlUp).Row + 1
s = 2
For tex = 1 To 17
Cells(son, s) = Controls("TextBox" & tex)
s = s + 1
Next
For sira = 2 To Cells(65536, "b").End(xlUp).Row
Cells(sira, "a") = sira - 1
Next
For temizle = 1 To 17
Controls("TextBox" & temizle) = Empty
Next
SIRALA = Cells(65536, "A").End(xlUp).Row
Sheets("veri").Range("A2:R" & SIRALA).Sort KEY1:=[B2], ORDER1:=xlAscending
TextBox8 = ".": TextBox8 = ""
ActiveWorkbook.Save
End Sub
