For Next yardımı Acil!

Katılım
13 Mayıs 2005
Mesajlar
16
Arkadaşlar siteyi yeni keşfettim.Herkese çok teşekkür ederim.
Benim sorum:Aşağıdaki örneği for next döngüsü ile nasıl yaparım?

Range(b2).Value = TextBox1.Value
Range(c2).Value = TextBox2.Value
Range(b3).Value = TextBox3.Value
Range(c3).Value = TextBox4.Value
Range(b4).Value = TextBox5.Value
Range(c4).Value = TextBox6.Value
.
.
.
.
.
Range(b80).Value = TextBox79.Value
Range(c81).Value = TextBox80.Value
 
Katılım
7 Temmuz 2004
Mesajlar
1,141
veya

[vb:1:f069314c51]x = 2
For a = 2 To 80 Step 2
Cells(x, 2) = Controls("textbox" & a - 1).Value
Cells(x, 3) = Controls("textbox" & a).Value
x = x + 1
Next[/vb:1:f069314c51]
 

veyselemre

Özel Üye
Katılım
9 Mart 2005
Mesajlar
3,646
Excel Vers. ve Dili
Pro Plus 2021
For c = 1 To 40
For x = 2 To 3
v = v + 1
Cells(c + 1, x) = Controls("TextBox" & v).Value
Next
Next
 
Üst