macro sayı yerine tarih bilgisi atıyor.HELP ME

Katılım
21 Şubat 2005
Mesajlar
17
herkese selam. :hey:
aşağıdaki macro doğru çalışmıyor.
macromdan textboxsa girdiğim tarih verisine göre O sütünuna
atanan değer kadar yazılması.sanırım kurcalarken karıştırdım.

şu anda sayı yerine tarih bilgisi çıkıyor.

Private Sub CommandButton1_Click()
On Error Resume Next
If TextBox1 = "" Then
MsgBox ("TARİHİ GİRİNİZ")
Exit Sub
End If
Sheets("Boya Kontrol").Select
Sheets("Boya Kontrol").[o1] = TextBox1.Value
Sheets("Boya Kontrol").Range("A8:C50").ClearContents
c = 0
sat = 0
Sheets("Boya Kontrol").[o1] = TextBox1.Value
Sheets("Boya Kontrol").[o2] = "1"
For a = 8 To Sheets("Kontrol Listesi").Cells(65536, 2).End(xlUp).Row + 8
tarih = TextBox1.Value
If Sheets("Kontrol Listesi").Cells(a, 9).Value = tarih Then
c = c + 1
Sheets("Boya Kontrol").Cells(c + 7, 1) = Sheets("Kontrol Listesi").Cells(a + sat, 2).Value
Sheets("Boya Kontrol").Cells(c + 7, 2) = Sheets("Kontrol Listesi").Cells(a + sat, 3).Value
Sheets("Boya Kontrol").Cells(c + 7, 3) = Sheets("Kontrol Listesi").Cells(a + sat, 4).Value
If c / 50 = Int(c / 50) Then
c = 0
soru = MsgBox("SAYFA DOLDU,EVET DERSENİZ YAZDIRDIKTAN SONRA DEVAM EDİLECEKTİR", vbYesNo, "YAZDIRILMADAN DEVAM EDİLECEKTİR")
If soru = vbYes Then
Sheets("Boya Kontrol").[o2] = Sheets("Boya Kontrol").[o2] + 1
End If
Sheets("Boya Kontrol").[o2] = Sheets("Boya Kontrol").[o2] + 1
End If
End If
Next a
End Sub
 
Katılım
2 Mart 2005
Mesajlar
225
Excel Vers. ve Dili
2003
2007
2010
Bunu bizim uygulamamızı beklemiyorsun herhalde hatalı satır hangisi. Dosyanı gönderirsen yardım edelim! :?
 
Üst