- Katılım
- 4 Mart 2011
- Mesajlar
- 38
- Excel Vers. ve Dili
- Türkçe/2010
Hücrelere CDate ile tarih aktarmak zorundayım. TextBox ile aktardığım bu verilerde, boş geçtiğim TextBoxlarda hata veriyor. Bir türlü düzeltemedim. Yardımlarınızı bekler, saygılarımı sunarım.
Private Sub CommandButton1_Click()
Dim Satır As Long, Say As Byte
Satır = Range("C2300").End(3).Row + 1
Cells(Satır, "B") = Satır - 10
Cells(Satır, "C") = TextBox1.Text
Range("D6") = CDate(TextBox2)
Cells(Satır, "D") = CDate(TextBox3)
Cells(Satır, "E") = CDate(TextBox4)
Cells(Satır, "F") = CDate(TextBox5)
Cells(Satır, "G") = CDate(TextBox6)
Cells(Satır, "H") = CDate(TextBox7)
Cells(Satır, "I") = CDate(TextBox8)
Cells(Satır, "J") = CDate(TextBox9)
Cells(Satır, "K") = CDate(TextBox10)
Cells(Satır, "L") = CDate(TextBox11)
Cells(Satır, "M") = CDate(TextBox12)
Cells(Satır, "N") = CDate(TextBox13)
Cells(Satır, "O") = CDate(TextBox14)
Cells(Satır, "P") = CDate(TextBox15)
Cells(Satır, "Q") = CDate(TextBox16)
Cells(Satır, "R") = CDate(TextBox17)
Cells(Satır, "S") = CDate(TextBox18)
Cells(Satır, "T") = CDate(TextBox19)
Cells(Satır, "U") = CDate(TextBox20)
Cells(Satır, "V") = CDate(TextBox21)
Cells(Satır, "W") = CDate(TextBox22)
With KAYIT_FORMU.ListBox1
.BackColor = vbBlue
.ColumnCount = 22
.ColumnWidths = "140;80;80;80;80;80;80;80;80;80;80;80;80;80;80;80;80;80;80;80;80;80"
.ForeColor = vbWhite
If Sheets("İZİN").Range("C11") = Empty Then
.RowSource = Empty
Else
.RowSource = "İZİN!C11:W" & [İZİN!B2300].End(1).Row
End If
End With
MsgBox "Kayıt işlemi tamamlanmıştır.", vbInformation, "Kayıt İşlemi"
End Sub
Private Sub CommandButton1_Click()
Dim Satır As Long, Say As Byte
Satır = Range("C2300").End(3).Row + 1
Cells(Satır, "B") = Satır - 10
Cells(Satır, "C") = TextBox1.Text
Range("D6") = CDate(TextBox2)
Cells(Satır, "D") = CDate(TextBox3)
Cells(Satır, "E") = CDate(TextBox4)
Cells(Satır, "F") = CDate(TextBox5)
Cells(Satır, "G") = CDate(TextBox6)
Cells(Satır, "H") = CDate(TextBox7)
Cells(Satır, "I") = CDate(TextBox8)
Cells(Satır, "J") = CDate(TextBox9)
Cells(Satır, "K") = CDate(TextBox10)
Cells(Satır, "L") = CDate(TextBox11)
Cells(Satır, "M") = CDate(TextBox12)
Cells(Satır, "N") = CDate(TextBox13)
Cells(Satır, "O") = CDate(TextBox14)
Cells(Satır, "P") = CDate(TextBox15)
Cells(Satır, "Q") = CDate(TextBox16)
Cells(Satır, "R") = CDate(TextBox17)
Cells(Satır, "S") = CDate(TextBox18)
Cells(Satır, "T") = CDate(TextBox19)
Cells(Satır, "U") = CDate(TextBox20)
Cells(Satır, "V") = CDate(TextBox21)
Cells(Satır, "W") = CDate(TextBox22)
With KAYIT_FORMU.ListBox1
.BackColor = vbBlue
.ColumnCount = 22
.ColumnWidths = "140;80;80;80;80;80;80;80;80;80;80;80;80;80;80;80;80;80;80;80;80;80"
.ForeColor = vbWhite
If Sheets("İZİN").Range("C11") = Empty Then
.RowSource = Empty
Else
.RowSource = "İZİN!C11:W" & [İZİN!B2300].End(1).Row
End If
End With
MsgBox "Kayıt işlemi tamamlanmıştır.", vbInformation, "Kayıt İşlemi"
End Sub
