• DİKKAT

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

do while döngüsü

erd5334

Altın Üye
Katılım
26 Nisan 2012
Mesajlar
123
Excel Vers. ve Dili
excel 365
arkadaşlar yazdığım kodda ne hatası var ki aktar butonuna tıkladığımda bir alt satıra geçmiyor.

Kod:
Private Sub CommandButton1_Click()
n = 20
    Range("a" & n) = TextBox1.Text
 Range("b" & n) = TextBox2.Text
 Range("c" & n) = TextBox3.Text
 Range("e" & n) = TextBox4.Text
 Range("f" & n) = TextBox5.Text

Do While Len(Range("a" & n)) > 0
   n = n + 1
    

Loop




End Sub
 
Deneyiniz.:cool:
Kod:
Private Sub CommandButton1_Click()
n = 20
    Range("a" & n) = TextBox1.Text
 Range("b" & n) = TextBox2.Text
 Range("c" & n) = TextBox3.Text
 Range("e" & n) = TextBox4.Text
 Range("f" & n) = TextBox5.Text


   n = n + 1


[B][COLOR="Red"]range("A" & n).select[/COLOR][/B]


End Sub
 
Deneyiniz.:cool:
Kod:
Private Sub CommandButton1_Click()
n = 20
    Range("a" & n) = TextBox1.Text
 Range("b" & n) = TextBox2.Text
 Range("c" & n) = TextBox3.Text
 Range("e" & n) = TextBox4.Text
 Range("f" & n) = TextBox5.Text


   n = n + 1


[B][COLOR="Red"]range("A" & n).select[/COLOR][/B]


End Sub
malesef olmadı
 
Buyurun.:cool:
Kod:
Dim sonsat As Long, sat As Long
sonsat = Cells(Rows.Count, "A").End(xlUp).Row
sat = sonsat + 1
If sat < 20 Then sat = 20
Range("a" & sat) = TextBox1.Text
Range("b" & sat) = TextBox2.Text
Range("c" & sat) = TextBox3.Text
Range("e" & sat) = TextBox4.Text
Range("f" & sat) = TextBox5.Text
 
Geri
Üst