• DİKKAT

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

Kaydet Makrosu Hk.

Katılım
23 Eylül 2008
Mesajlar
16
Excel Vers. ve Dili
excel 2003
Private Sub CommandButton2_Click()
If TextBox1.Text <> Empty And TextBox2.Text <> Empty And TextBox4.Text <> Empty And TextBox5.Text <> Empty And TextBox3.Text <> Empty And TextBox6.Text <> Empty And TextBox7.Text <> Empty And TextBox8.Text <> Empty And TextBox9.Text <> Empty And TextBox10.Text <> Empty And TextBox11.Text <> Empty And TextBox12.Text <> Empty And TextBox13.Text <> Empty And TextBox14.Text <> Empty And TextBox15.Text <> Empty And TextBox16.Text <> Empty And TextBox17.Text <> Empty And TextBox18.Text <> Empty And TextBox19.Text <> Empty And TextBox20.Text <> Empty And TextBox21.Text <> Empty And TextBox22.Text <> Empty And TextBox23.Text <> Empty And TextBox24.Text <> Empty And TextBox25.Text <> Empty And TextBox26.Text <> Empty And TextBox27.Text <> Empty And TextBox28.Text <> Empty And TextBox29.Text <> Empty And TextBox30.Text <> Empty And TextBox31.Text <> Empty And TextBox32.Text <> Empty And TextBox33.Text <> Empty And TextBox34.Text <> Empty And TextBox35.Text <> Empty And TextBox36.Text <> Empty And TextBox37.Text <> Empty And _
ComboBox1.Text <> Empty Then
TextBox3 = Sayfa3.Range("a65536").End(3).Value + 1
Else
MsgBox "Eksik bilgi girilmiş", vbExclamation, "Ocakcı 2010"
CommandButton1_Click
Exit Sub
End If
With Sayfa3
For Each bul In Sayfa3.Range("b2:b" & Range("b65536").End(3).Row)
If bul = ComboBox1 Then
Label5.Visible = True
Exit Sub
End If
Next bul
For Each bul In .Range("b2:b" & Range("b65536").End(3).Row)
If bul = ComboBox1 Then
bul.Offset(i, -1).Activate
bul.Offset(i, 1) = TextBox1
bul.Offset(i, 2) = TextBox2
bul.Offset(i, -1) = TextBox3
bul.Offset(i, 3) = TextBox4
bul.Offset(i, 4) = TextBox5
bul.Offset(i, 5) = TextBox6
bul.Offset(i, 6) = TextBox7
bul.Offset(i, 7) = TextBox8
bul.Offset(i, 8) = TextBox9
bul.Offset(i, 9) = TextBox10
bul.Offset(i, 10) = TextBox11
bul.Offset(i, 11) = TextBox12
bul.Offset(i, 12) = TextBox13
bul.Offset(i, 13) = TextBox14
bul.Offset(i, 14) = TextBox15
bul.Offset(i, 15) = TextBox16
bul.Offset(i, 16) = TextBox17
bul.Offset(i, 17) = TextBox18
bul.Offset(i, 18) = TextBox19
bul.Offset(i, 19) = TextBox20
bul.Offset(i, 20) = TextBox21
bul.Offset(i, 21) = TextBox22
bul.Offset(i, 22) = TextBox23
bul.Offset(i, 23) = TextBox24
bul.Offset(i, 24) = TextBox25
bul.Offset(i, 25) = TextBox26
bul.Offset(i, 26) = TextBox27
bul.Offset(i, 27) = TextBox28
bul.Offset(i, 28) = TextBox29
bul.Offset(i, 29) = TextBox30
bul.Offset(i, 30) = TextBox31
bul.Offset(i, 31) = TextBox32
bul.Offset(i, 32) = TextBox33
bul.Offset(i, 33) = TextBox34
bul.Offset(i, 34) = TextBox35
bul.Offset(i, 35) = TextBox36
bul.Offset(i, 36) = TextBox37
bul.Offset(i, 37) = TextBox38
UserForm_Initialize
Exit For
Else
.Range("a65536").End(3).Offset(1, 0) = .Range("a65536").End(3) + 1
.Range("a65536").End(3).Offset(0, 1) = ComboBox1
.Range("a65536").End(3).Offset(0, 2) = TextBox1
.Range("a65536").End(3).Offset(0, 3) = TextBox2
.Range("a65536").End(3).Offset(0, 4) = TextBox4
.Range("a65536").End(3).Offset(0, 5) = TextBox5
.Range("a65536").End(3).Offset(0, 6) = TextBox6
.Range("a65536").End(3).Offset(0, 7) = TextBox7
.Range("a65536").End(3).Offset(0, 8) = TextBox8
.Range("a65536").End(3).Offset(0, 9) = TextBox9
.Range("a65536").End(3).Offset(0, 10) = TextBox10
.Range("a65536").End(3).Offset(0, 11) = TextBox11
.Range("a65536").End(3).Offset(0, 12) = TextBox12
.Range("a65536").End(3).Offset(0, 13) = TextBox13
.Range("a65536").End(3).Offset(0, 14) = TextBox14
.Range("a65536").End(3).Offset(0, 15) = TextBox15
.Range("a65536").End(3).Offset(0, 16) = TextBox16
.Range("a65536").End(3).Offset(0, 17) = TextBox17
.Range("a65536").End(3).Offset(0, 18) = TextBox18
.Range("a65536").End(3).Offset(0, 19) = TextBox19
.Range("a65536").End(3).Offset(0, 20) = TextBox20
.Range("a65536").End(3).Offset(0, 21) = TextBox21
.Range("a65536").End(3).Offset(0, 22) = TextBox22
.Range("a65536").End(3).Offset(0, 23) = TextBox23
.Range("a65536").End(3).Offset(0, 24) = TextBox24
.Range("a65536").End(3).Offset(0, 25) = TextBox25
.Range("a65536").End(3).Offset(0, 26) = TextBox26
.Range("a65536").End(3).Offset(0, 27) = TextBox27
.Range("a65536").End(3).Offset(0, 28) = TextBox28
.Range("a65536").End(3).Offset(0, 29) = TextBox29
.Range("a65536").End(3).Offset(0, 30) = TextBox30
.Range("a65536").End(3).Offset(0, 31) = TextBox31
.Range("a65536").End(3).Offset(0, 32) = TextBox32
.Range("a65536").End(3).Offset(0, 33) = TextBox33
.Range("a65536").End(3).Offset(0, 34) = TextBox34
.Range("a65536").End(3).Offset(0, 35) = TextBox35
.Range("a65536").End(3).Offset(0, 36) = TextBox36
.Range("a65536").End(3).Offset(0, 37) = TextBox37
.Range("a65536").End(3).Offset(0, 38) = TextBox38
UserForm_Initialize
Exit For
End If
Next bul
End With
End Sub



Arkadaşlar yapmış olduğum 38 adet textbox ve 1 adet comboboxtan oluşan userform'da bir adet kaydet butonu yerleştirdim. Ancak kodu yazdıktan sonra excel "Dosya Kaydedilmedi" hatası veriyor. Kod yukarıda. Acaba nerede yanlış yapıyorum.
 
Şifreyi aktif hale getirmedim. Tamam diyerek geçebilirsiniz. Kayıt butonunun yeri Ana Menü -> Merkez Depo-> Veri Gir -> Giderler Kısmında bulunmakta. Kaydet ve Bul kodlarını yine sizin yazmış olduğunuz Userform örneğinden aldım. Ancak baştada dediğim gibi iki kodu yazdığımda da Excel "Dosya Kaydedilmedi" hatası veriyor.

Birde bu dosyaya uygun 'Bul' butonu yapma şansımız varmı.

Yardımlarınız için tşk'ler.
 

Ekli dosyalar

arkadaşlar yardımcı olabilecek kimse yokmu?
 
Geri
Üst