• DİKKAT

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

userform ile kayıt

  • Konbuyu başlatan Konbuyu başlatan bugüven
  • Başlangıç tarihi Başlangıç tarihi
Katılım
8 Şubat 2013
Mesajlar
103
Excel Vers. ve Dili
excel 2007
verileri excele kaydediyorum fakat sürekli 2. satırdan başlıyor. istediğim satırdan başlatabilmek için aşağıdaki kodda ne gibi değişiklik yapabilirim.
Private Sub CommandButton1_Click()
ListView1.ListItems.Clear
Dim sn
If Sheets(1).Range("a1").Value = "" Then
sn = Sheets(1).[a60000].End(3).Row
Else
sn = Sheets(1).[a60000].End(3).Row + 1
End If
'Genel bilgiler
Set sht = Sheets("liste")
sht.Cells(sn, 1).Value = TextBox1.Text
sht.Cells(sn, 2).Value = TextBox2.Text
sht.Cells(sn, 4).Value = TextBox3.Text
sht.Cells(sn, 3).Value = Me.ComboBox1
Set sht = Nothing
Call UserForm_Initialize
If TextBox1.Value = "" Then
MsgBox "Sıra No Girmediniz... Lütfen sıra no yada herhangi bir karaketer giriniz!", vbCritical, "D İ K K A T"
TextBox1.SetFocus
Exit Sub
End If
Yeni_mi = True
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
ComboBox1.Text = ""
End Sub
 
Merhaba,
SonSat = Cells(Rows.Count, "a").End(3).Row + 1
If SonSat < 15 Then SonSat = 15
Range("a" & SonSat).Select

a sütununun 15.satırından başlar.
 
merhaba korhan bey yazdığınız kodu kendime uyarlayamadım hata verdi.
 
Merhaba yukarıdaki kodları içeren dosyanızı ekler misiniz? Bu şekilde yapmak istediğiniz net değil. dosya üzerinde yapılması gerekni açıklam şeklinde belirtir misiniz?
 
Merhaba. Kırmızı ile gösterilen değeri kaçıncı satırdan başlatacaksan ayarlayabilirsin.

Kod:
sht.Cells(sn[COLOR="Red"]+10[/COLOR], 1).Value = TextBox1.Text
sht.Cells(sn[COLOR="Red"]+10[/COLOR], 2).Value = TextBox2.Text
sht.Cells(sn[COLOR="red"]+10[/COLOR], 4).Value = TextBox3.Text
sht.Cells(sn[COLOR="red"]+10[/COLOR], 3).Value = Me.ComboBox1
 
Merhaba,
Private Sub CommandButton1_Click()
SonSat = Cells(Rows.Count, "a").End(3).Row + 1
If SonSat < 15 Then SonSat = 15
Range("a" & SonSat).Select

Set sht = Sheets("liste")
sht.Cells(sn, 1).Value = TextBox1.Text
sht.Cells(sn, 2).Value = TextBox2.Text
sht.Cells(sn, 4).Value = TextBox3.Text
sht.Cells(sn, 3).Value = Me.ComboBox1
Set sht = Nothing
Call UserForm_Initialize
If TextBox1.Value = "" Then
MsgBox "Sıra No Girmediniz... Lütfen sıra no yada herhangi bir karaketer giriniz!", vbCritical, "D İ K K A T"
TextBox1.SetFocus
Exit Sub
End If
Yeni_mi = True
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
ComboBox1.Text = ""
End Sub[/QUOTE]

Bu şekilde deneyiniz.
 
merhaba.. ilginiz için teşekkür ederim.
vardar07 hocam sizin önerinizi denedim. 10. satırdan sonra ardışık olarak kaydetmiyor. 11-11 atlayarak kaydediyor.
korhan hocam sizin önerinzde hata verdi.
örnek dosyam ekte isterseniz bi inceleyin...
 

Ekli dosyalar

Merhaba ,Aşağıdaki kodları denermisin.

Kod:
Private Sub CommandButton1_Click()
ListView1.ListItems.Clear
If TextBox1.Value <> "" And TextBox2.Value <> "" And ComboBox1.Value <> "" And TextBox3.Value <> "" Then
    Son_Dolu_Satir = Sheets("liste").Range("A65536").End(xlUp).Row
    Bos_Satir = Son_Dolu_Satir + 1
    Sheets("liste").Range("a" & Bos_Satir).Value = TextBox1.Text
    Sheets("liste").Range("b" & Bos_Satir).Value = TextBox2.Text
    Sheets("liste").Range("c" & Bos_Satir).Value = ComboBox1.Text
    Sheets("liste").Range("d" & Bos_Satir).Value = TextBox3.Text
    End If
If TextBox1.Value <> "" And TextBox2.Value <> "" And ComboBox1.Value <> "" And TextBox3.Value <> "" Then
    Son_Dolu_Satir = Sheets("fiyatiste").Range("A65536").End(xlUp).Row
    Bos_Satir = Son_Dolu_Satir + 1
    Sheets("fiyatiste").Range("a" & Bos_Satir).Value = TextBox1.Text
    Sheets("fiyatiste").Range("b" & Bos_Satir).Value = TextBox2.Text
    Sheets("fiyatiste").Range("c" & Bos_Satir).Value = ComboBox1.Text
    Sheets("fiyatiste").Range("d" & Bos_Satir).Value = TextBox3.Text
    End If
Call UserForm_Initialize
If TextBox1.Value = "" Then
    MsgBox "Sıra No Girmediniz... Lütfen sıra no yada herhangi bir karaketer giriniz!", vbCritical, "D İ K K A T"
    TextBox1.SetFocus
    Exit Sub
End If
Yeni_mi = True
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
ComboBox1.Text = ""
End Sub
Ayrıca UserForm_Initialize deki
For i = 2 To Cells(65536, 1).End(3).Row bu kodu aşağıdaki değiştirip denermisiniz.
For i = 15 To Cells(65536, 1).End(3).Row
 
Geri
Üst