• DİKKAT

    DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
    Altın Üyelik Hakkında Bilgi

Kayıt Problemi hata kaynağı nedir

Katılım
13 Haziran 2009
Mesajlar
486
Excel Vers. ve Dili
excel 2007 tr
...........................................
Next txt
sh.Cells(sat, 7).Value = Format(TextBox13.Text, "dd.mm.yyyy") & "-" & Format(TextBox23.Text, "hh:mm")
sh.Cells(sat, 9).Value = Format(TextBox15.Text, "dd.mm.yyyy") & "-" & Format(TextBox26.Text, "hh:mm")
sh.Cells(sat, 10).Value = TextBox16.Text & "-" & Format(TextBox24.Text, "#,##0.00")
sh.Cells(sat, 13).Value = TextBox19.Text & "/" & TextBox27.Text
sh.Cells(sat, 15).Value = TextBox21.Text & "-" & TextBox29.Text
sh.Cells(sat, 16).Value = TextBox5.Text & "-" & TextBox22.Text
'sh.Cells(sat,16).Value= TextBox5.Text& "-"& TextBox22.Text
MsgBox "Kayıt Başarı ile Girildi.", vbOKOnly + vbInformation, Application.UserName
On Error Resume Next
For Each txt In Frame2.Controls
txt.Value = ""
Next txt
With UserForm1.ListBox1
.BackColor = vbYellow
.ColumnCount = 7
.ColumnWidths = "20;100;50;30;30;30;30"
.ForeColor = vbRed
If Sheets("Sayfa1").Range("A5") = Empty Then
.RowSource = Empty
Else
.RowSource = "Sayfa1!A5:P" & [Sayfa1!A65536].End(3).Row
End If
End With

MsgBox "Kayıt işlemi tamamlanmıştır.", vbInformation

End Sub



Selamlar,
Yine kayıt problemi yaşamaya başladım bir formumda.
End Sub hata olarak görünüyor.(Kodun bir kısmı yeterli olurmu acaba)
 
Selamlar,

Bu şekilde hatanın sebebini bulmak zor olacaktır. Dosyanızı eklermisiniz.
 
Selamlar,

End If ifadesini eksik kullandığınız için hata alıyorsunuz. Aşağıdaki nesneleri kontrol eden satırların altına End If eklerseniz düzelir.

If TextBox27.Text = "" Then
If TextBox29.Text = "" Then
If TextBox5.Text = "" Then

İlk satır için örneklersek; (Kırmızı renki bölümü eklemelisiniz.)
Kod:
If TextBox27.Text = "" Then
    MsgBox "Adresin bağlı olduğu İl boş olamaz." & vbLf & "Kayıt Yapılmadı.", vbCritical, "UYARI"
    TextBox27.SetFocus
    Exit Sub
[COLOR=red]End If[/COLOR]
 
Hocam,
Yürekten teşekkürler,Sağolun.
 
Geri
Üst