• DİKKAT

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

Userform kapanıyor

Katılım
5 Aralık 2004
Mesajlar
130
Excel Vers. ve Dili
Excel 2003 Türkçe
Arkadaşlar bir form hazırlıyorum ama ilk başta hata almaya başladım. Eklediğim dosyadaki form kaydet dedikten sonra kapanıyor yardımcı olursanız cok sevinirim.
 

Ekli dosyalar

Cevabınız için teşekkürler. Malesef olmuyor end satırını sildiğimizde satır 10000 e kadar değer yazıyor.
 
Arkadaşlar bir form hazırlıyorum ama ilk başta hata almaya başladım. Eklediğim dosyadaki form kaydet dedikten sonra kapanıyor yardımcı olursanız cok sevinirim.

End if den once kullandığınız edn komutu yuzunden kapanmakta.


kodları aşağıdaki gibi değiştirin..

bu işlemden sonra text ve comboboxların içini temizlemeniz gerekecek.
Kod:
Private Sub CommandButton1_Click()
Dim i As Integer
Dim x As Integer
x = Sayfa2.Cells(1, 14)
x = x + 1
If UserForm1.TextBox1 = "" Or UserForm1.TextBox2 = "" Or UserForm1.TextBox3 = "" Then
MsgBox "Lütfen (*) İşaretli Alanları Boş Bırakmayınız !"
End If
Sonsat = Cells(Rows.Count, 3).End(3).Row + 1
If Trim(UserForm1.TextBox1) = Trim(Sayfa1.Cells(Sonsat, 1)) Then
Sayfa1.Cells(Sonsat, 1) = UserForm1.TextBox1
Sayfa1.Cells(Sonsat, 3) = UserForm1.TextBox2
Sayfa1.Cells(Sonsat, 4) = UserForm1.TextBox3
Sayfa1.Cells(Sonsat, 5) = UserForm1.ComboBox1.Value
Sayfa1.Cells(Sonsat, 6) = UserForm1.TextBox4
Sayfa1.Cells(Sonsat, 7) = UserForm1.TextBox5
Sayfa1.Cells(Sonsat, 8) = UserForm1.ComboBox2.Value
Sayfa1.Cells(Sonsat, 9) = UserForm1.TextBox6
Sayfa1.Cells(Sonsat, 10) = UserForm1.TextBox7
Sayfa1.Cells(Sonsat, 11) = UserForm1.ComboBox3.Value
Sayfa1.Cells(Sonsat, 12) = UserForm1.ComboBox4.Value
Sayfa1.Cells(Sonsat, 13) = UserForm1.ComboBox5.Value
Sayfa1.Cells(Sonsat, 14) = UserForm1.ComboBox6.Value
Sayfa1.Cells(Sonsat, 15) = UserForm1.ComboBox9.Value
Sayfa1.Cells(Sonsat, 16) = UserForm1.ComboBox10.Value
Sayfa1.Cells(Sonsat, 17) = UserForm1.ComboBox11.Value
Sayfa1.Cells(Sonsat, 18) = UserForm1.TextBox8
Sayfa1.Cells(Sonsat, 19) = UserForm1.ComboBox7.Value
Sayfa1.Cells(Sonsat, 20) = UserForm1.ComboBox8.Value
Sayfa1.Cells(Sonsat, 21) = UserForm1.TextBox9
Sayfa1.Cells(Sonsat, 2) = x
End If
If Sayfa1.Cells(Sonsat, 1) = "" Then
Sayfa1.Cells(Sonsat, 1) = UserForm1.TextBox1
Sayfa1.Cells(Sonsat, 3) = UserForm1.TextBox2
Sayfa1.Cells(Sonsat, 4) = UserForm1.TextBox3
Sayfa1.Cells(Sonsat, 5) = UserForm1.ComboBox1.Value
Sayfa1.Cells(Sonsat, 6) = UserForm1.TextBox4
Sayfa1.Cells(Sonsat, 7) = UserForm1.TextBox5
Sayfa1.Cells(Sonsat, 8) = UserForm1.ComboBox2.Value
Sayfa1.Cells(Sonsat, 9) = UserForm1.TextBox6
Sayfa1.Cells(Sonsat, 10) = UserForm1.TextBox7
Sayfa1.Cells(Sonsat, 11) = UserForm1.ComboBox3.Value
Sayfa1.Cells(Sonsat, 12) = UserForm1.ComboBox4.Value
Sayfa1.Cells(Sonsat, 13) = UserForm1.ComboBox5.Value
Sayfa1.Cells(Sonsat, 14) = UserForm1.ComboBox6.Value
Sayfa1.Cells(Sonsat, 15) = UserForm1.ComboBox9.Value
Sayfa1.Cells(Sonsat, 16) = UserForm1.ComboBox10.Value
Sayfa1.Cells(Sonsat, 17) = UserForm1.ComboBox11.Value
Sayfa1.Cells(Sonsat, 18) = UserForm1.TextBox8
Sayfa1.Cells(Sonsat, 19) = UserForm1.ComboBox7.Value
Sayfa1.Cells(Sonsat, 20) = UserForm1.ComboBox8.Value
Sayfa1.Cells(Sonsat, 21) = UserForm1.TextBox9
Sayfa1.Cells(Sonsat, 2) = x
End If
End Sub
 
çok teşekkürler. ellirinize sağlık.
 
Geri
Üst