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
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
