• DİKKAT

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

Export / İmport sonrası kodlarımda revizyon sorunu...

Katılım
19 Haziran 2007
Mesajlar
418
Excel Vers. ve Dili
excel 2007
Merhaba arkadaşlar.
"satış" adlı formumu "takip" adı ile export/import yaparak oluşturdum.
Pek çok kodlarda revizyon yaparak düzenlemeler yaptım. Lakin bir konuda yardımınıza ihtiyacım var.

"takip" formunda "düzelt" butonum referans aldığı sayfadaki veriyi değil "satış" sayfasındaki veriyi düzeltiyor. Bu konuda yardımcı olabilir misiniz?

Kodlarım ve dosyam ektedir. Saygılarımla...

Kod:
Private Sub CommandButton3_Click()

If ListBox1.ListCount > 0 Then
Lab = ListBox1.ListIndex + 1
Else
MsgBox "listede hiç veri yok"
Exit Sub
End If

If Lab <= 0 Then
MsgBox "listeden veri seçiniz"
Exit Sub
End If
'Değiştir butonuna basıldığında yapılacak işlemler.
sor = MsgBox("Değiştirmek istediğinizden emin misiniz?", vbYesNo)
'mesaj kutusu devreye giriyor.
If sor = vbNo Then Exit Sub
'evet veya hayır cevaplarından Hayır ise kodlar sonlandırılıyor.
            
If ListBox1.Column(21) = 0 Or ListBox1.Column(21) = "" Then
sonsat = ListBox1.ListIndex + 2
Else
sonsat = ListBox1.Column(21)
End If
'son satır numarası alınıyor.
Cells(sonsat, 1) = TextBox1.Value
'ikinci sutununun en son satırına textbox2 deki açıklama yazılıyor.

Cells(sonsat, 2) = TextBox2.Value
Cells(sonsat, 3) = TextBox3.Value
Cells(sonsat, 4) = TextBox4.Value
Cells(sonsat, 5) = ComboBox1.Value
Cells(sonsat, 6) = ComboBox2.Value
Cells(sonsat, 7) = TextBox5.Value
Cells(sonsat, 8) = TextBox6.Value
Cells(sonsat, 9) = TextBox7.Value
Cells(sonsat, 10) = ComboBox3.Value
Cells(sonsat, 11) = ComboBox4.Value
Cells(sonsat, 12) = TextBox8.Value
Cells(sonsat, 13) = ComboBox5.Value
Cells(sonsat, 14) = ComboBox6.Value
Cells(sonsat, 15) = ComboBox7.Value
Cells(sonsat, 16) = ComboBox8.Value
Cells(sonsat, 17) = ComboBox9.Value
Cells(sonsat, 18) = ComboBox10.Value
Cells(sonsat, 19) = ComboBox11.Value
Cells(sonsat, 20) = TextBox9.Value
Cells(sonsat, 21) = TextBox10.Value
Cells(sonsat, 22) = CLng(CDate(TextBox12))
ListBox1.RowSource = "A2:V" & [a65536].End(3).Row
'liste kutusunun satır kaynagının hangi hücreler olduğu belirtiliyor.
MsgBox "DEĞİŞİKLİK YAPILMIŞTIR"


For i = 2 To 10
Controls("Textbox" & i).Value = ""
Next
ListBox1.RowSource = "A1:U" & [a65536].End(3).Row

    Call UserForm_Initialize
End Sub
 

Ekli dosyalar

açılışta hata alıyorum "object contains..... "
 
"if sor = vbno then exit sub " dan sonraki satıra sayfa6.select yazıp denermisiniz
 
"if sor = vbno then exit sub " dan sonraki satıra sayfa6.select yazıp denermisiniz

Evet oldu Sayın snx111
Allah razı olsun. Çok küçük bir ayrıntı ama, bilmeyince... :)

Bu arada, excel arkaplanda sayfaya gidip geliyor.
Bu gidip gelme olmadan yapacak bir şey yok mu? Umarım çok şey istemiyorumdur.
 
sayfa6.activate deneyin ; yada with sayfa6 ........ end with
 
Geri
Üst