• DİKKAT

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

satır no hep 5 yapması

yamahato

Altın Üye
Katılım
20 Mayıs 2009
Mesajlar
236
Excel Vers. ve Dili
excel 2007
Private Sub CommandButton4_Click()

Son_Dolu_Satir = Sheets("ARAÇ BİLGİ DEPOSU").Range("A65536").End(xlUp).Row
Bos_Satir = Son_Dolu_Satir + 1
If TextBox1.Text <> "" Then
If TextBox2.Text <> "" Then
If TextBox3.Text <> "" Then
If TextBox4.Text <> "" Then
If TextBox5.Text <> "" Then
If TextBox6.Text <> "" Then
If TextBox7.Text <> "" Then
If TextBox8.Text <> "" Then
If TextBox9.Text <> "" Then
If TextBox10.Text <> "" Then



End If
End If
End If
End If
End If
End If
End If
End If
End If
End If

' ************* eksik veri girişi kontrolü******************
For i = 1 To 10
If Controls("textbox" & i) = "" Then
MsgBox "Veri Girişi Eksiktir.!"
TextBox1.SetFocus
Exit Sub
End If
Next i



Sheets("ARAÇ BİLGİ DEPOSU").Range("A" & Bos_Satir).Value = _
Application.WorksheetFunction.Max(Sheets("BAKIM ONARIM BİLGİ DEPOSU").Range("A:A")) + 1

Sheets("ARAÇ BİLGİ DEPOSU").Range("B" & Bos_Satir).Value = TextBox1.Text

Sheets("ARAÇ BİLGİ DEPOSU").Range("C" & Bos_Satir).Value = TextBox2.Text

Sheets("ARAÇ BİLGİ DEPOSU").Range("D" & Bos_Satir).Value = TextBox3.Text

Sheets("ARAÇ BİLGİ DEPOSU").Range("E" & Bos_Satir).Value = TextBox4.Text

Sheets("ARAÇ BİLGİ DEPOSU").Range("F" & Bos_Satir).Value = TextBox5.Text

Sheets("ARAÇ BİLGİ DEPOSU").Range("G" & Bos_Satir).Value = TextBox6.Text

Sheets("ARAÇ BİLGİ DEPOSU").Range("H" & Bos_Satir).Value = TextBox7.Text

Sheets("ARAÇ BİLGİ DEPOSU").Range("I" & Bos_Satir).Value = TextBox8.Text

Sheets("ARAÇ BİLGİ DEPOSU").Range("J" & Bos_Satir).Value = TextBox9.Text

Sheets("ARAÇ BİLGİ DEPOSU").Range("K" & Bos_Satir).Value = TextBox10.Text

Sheets("ARAÇ BİLGİ DEPOSU").Select

MsgBox "KAYIT İŞLEMİ TAMAMLANMIŞTIR", vbOKOnly, "GİRİŞ"

' *************** kayıt sonrası temizlik ***************

TextBox1.Value = "": TextBox3.Value = "": TextBox2.Value = ""
TextBox4.Value = "": TextBox5.Value = "": TextBox6.Value = ""
TextBox7.Value = "": TextBox8.Value = "": TextBox9.Value = ""
TextBox10.Value = "":
TextBox1.SetFocus


End Sub

Bu kodda ne yanlış var ki exceldeki çalışma sayfasında sıra no 1 2 3 4 diye gitmesi gerekirken her kayıtta 5 oluyor saygılar
 
Kodu aşağıdaki gibi değiştirip denermisiniz

Kod:
Application.WorksheetFunction(Sheets("BAKIM ONARIM BİLGİ DEPOSU").Range("A:A")) + 1
 
Geri
Üst